0% found this document useful (0 votes)
14 views

DB Topic 2 - Databases & Database Management Systems

topic 2
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

DB Topic 2 - Databases & Database Management Systems

topic 2
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 30

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

Database definition
A shared collection of logically related
data, and a description of this
data, designed to meet the information
needs of an organization.

V1.0 ©NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.5

Data in MS Access

V1.0 ©NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.6

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.7

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

V1.0 ©NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.8

Metadata in MS Access

V1.0 ©NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.9

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.10

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.11

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.12

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.13

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 user’s
perspective.

V1.0 ©NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.14

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.15

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. Access’s forms wizard.

V1.0 ©NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.16

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.17

Common Applications
• Forms I user interact with form to enter or view
data – save to database
• Reports – data is retrieved from DB in read only
mode, viewed, printed or attached
• Web-applications – Internet applications access
many servers that store data
• Batch processes – applications executed at once
and affect many records e.g. Payroll

V1.0 ©NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.18

DBMS – Architecture
• Kernel
• Toolkit
• Interface

V1.0 ©NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.19

Kernel, Interface and Toolkit


DBMS Toolkit- end-user tools

Interface – interaction
DBMS Kernel- CRUD

Database

V1.0 ©NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.20

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.21

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.22

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.23

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.24

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.25

Market Share of Commercial


Products

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

V1.0 ©NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.26

Commercial Implementations
• Oracle
• Microsoft SQL Server
• MySQL

V1.0 ©NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.27

Data Models
• Hierarchical –Inverted tree, parent child
relationship
• Network – no level many interactions
• Relational- table with columns and rows
• Object-oriented – Support OO programming
features
• Deductive
• Post-relational

V1.0 ©NCC Education Limited


Databases and Database Management Systems Topic 2 - 2.28

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.29

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.30

Topic 2 – Databases and Database


Management Systems

Any Questions?

V1.0 ©NCC Education Limited

You might also like