You are on page 1of 29

Databases

Topic 2:
Databases and Database Management
Systems

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.2

Scope and Coverage


This topic will cover:
Databases
Types of applications
Pre-database information systems
Database approach
Database management systems
Commercial implementations
The relational model and alternatives

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.3

Learning Outcomes
By the end of this topic, students will be able to:
Describe the main features of a database system
Understand the role of the database management
system
Describe pre-database information systems
Identify some of the commercial products available
Understand the importance of the relational model
and identify some alternatives to it

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.4

Data in MS Access

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.5

Data in Oracle SQL


SQL> select * from emp;

EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO


--------- ---------- --------- --------- --------- --------- --------- ---------
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10

14 rows selected.

SQL>

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.6

Metadata - 1
Name Type Length Description
Student Name Character 50 Students
name
Student ID Number 8 Unique identification
number for a student
Date of Birth Date 8 Students date of birth
in the format
01.01.80

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.7

Metadata in MS Access

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.8

Metadata in Oracle SQL


SQL> desc emp
Name Null? Type
------------------------------- -------- ----
EMPNO NOT NULL NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)

SQL>

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.9

Metadata - 2
Metadata is data that is about data.
It is the way in which the database keeps
information about its own structure.
It is important in understanding how data can be
independent of applications in the database
approach.
Metadata is stored in the data dictionary.

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.10

Activity
Define metadata for data about the following:
- Students in a college database
- Books in a library system
- Holidays booked by a person at a workplace

Try to think about what data needs to be kept - will


it be a character, date or number?

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.11

Two-File Processing System


Customer
Customer
File Processing System
User
Customer File

Rental File Rental

User Processing System

Rental File

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.12

File Processing Systems


Data are separated and isolated.
Data are often duplicated.
Application programs are dependent on file
formats.
Files are often incompatible with one another.
It is difficult to represent data in a users
perspective.

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.13

Basic Structure of a Database


User Customer
Processing
Application

User Rental
Processing
Application

DBMS
User Other
Application

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.14

Database System in Detail


DBMS serves as intermediary
between user and the database by translating
user requests into the complex code required
Customer to fulfill those requests.
User Processing
Application Requests
Application

Data
Rental Application Requests METADATA
User Processing DATA
Application Data
Application Requests
DBMS
Other Database
User Application Data Management Database
System
Application programs might be written in a programming
Language, such as Visual Basic or C++, or it might
be created through a DBMS utility e.g. Accesss forms wizard.

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.15

Features of the Database Approach


Integrated data
Reduced data duplication
Program/data independence
Easier representation of users perspectives
Database systems are self-describing
Database systems maintain program-data
independence.
A database is a model of a model.

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.16

Common Applications
Forms
Reports
Web-applications
Batch processes

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.17

DBMS Architecture
Kernel
Toolkit
Interface

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.18

Kernel, Interface and Toolkit


DBMS Toolkit
Interface
DBMS Kernel

Database

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.19

Database Management Systems


DBMS-Functions
CRUD functions
Data dictionary
Transaction management
Concurrency control
Recovery
Authorisation
Data communication
Data integrity
Administration utilities

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.20

DBMS Interface Functions


Data Definition Language DDL
Data Manipulation Language DML
Data Integrity Language DIL
Data Control Language DCL

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.21

Activity: Advantages of DBMS - 1


Control of data redundancy
Data consistency
More information from the same amount of data
Sharing of data
Improved data integrity
Improved security
Enforcement of standards

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.22

Activity: Advantages of DBMS - 2


Economy of scale
Balance of conflicting requirements
Improved data accessibility and responsiveness
Increased productivity
Improved maintenance through data independence
Increased concurrency
Improved backup and recovery services

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.23

Activity: Disadvantages of DBMS


Complexity
Size
Cost of DBMSs
Additional hardware costs
Cost of conversion
Performance
Higher impact of a failure

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.24

Market Share of Commercial


Products
Market Share 2008

Others
14%
MySQL
DB2 29%
10%

MS Access /
Sql SERVER
24%
Oracle
23%

Figures taken from http://online.creativesystemdesigns.com/projects/databases.asp

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.25

Commercial Implementations
Oracle
Microsoft SQL Server
MySQL

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.26

Data Models
Hierarchical
Network
Relational
Object-oriented
Deductive
Post-relational

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.27

Learning Outcomes Revisited


Are you able to:
Describe the main features of a database system?
Understand the role of the database management
system?
Describe pre-database information systems?
Identify some of the commercial products
available?
Understand the importance of the relational model
and identify some alternatives to it?

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.28

References
Benyon-Davies, P. (2003). Database Systems, 3rd
edition. Palgrave Macmillan. Chapters 5 and 6.
Connolly, T. & Begg, C. (2004). Database
Systems: A Practical Approach to Design,
Implementation and Management, 4th edition.
Addision Wesley. Chapter 1.
Creative Systems Design website:
http://online.creativesystemdesigns.com/projects/d
atabases.asp (Retrieved 6/04/2011).

V1.0 NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.29

Topic 2 Databases and Database


Management Systems

Any Questions?

V1.0 NCC Education Limited

You might also like