Sie sind auf Seite 1von 5

Objectives

¾ Basic concepts of database

¾ Characteristics of database systems


CI6205 Database Systems
¾ Architecture and components of database system

Module 1: Database Concepts

Reading: Chaps. 1 & 2

What is a Database? Traditional File Processing vs. Database

¾ A database is a collection of related data Sales Order program Payroll program Invoicing program
¾ Implicit properties:
ƒ A database represents some aspect of real-world (miniworld)
ƒ A database is designed for some specific application Customer Inventory Salesman Employee Customer
ƒ It has an intended group of users Traditional File processing approach

Sales Order program Payroll program Invoicing program

DBMS

Customer Inventory Employee Other data

3
Database as a collection of related files 4
A more formal definition of a Database Why use a DBMS?

¾ A database is a mechanized, shared, formally defined and ¾ A Database Management System (DBMS) is a software
centrally controlled collection of data. package designed to store and manage databases
ƒ Data sharing
ƒ Minimal data redundancy
¾ Implications:
ƒ Consistency of data
ƒ Multiple Independent Users
ƒ Integrity and Security
ƒ Concurrent Access
ƒ Reduced application development time
ƒ Central Repository
ƒ Data Independence
ƒ Information
– Logical and Physical data independence
– New data requirement
– Representation of data
– Structure of stored files

5 6

Example of logical data independence Example of logical data independence

Staff-no
Invoice Staff-name
Program Customer-no
Address
Customer-name
Personnel Tel-no
Address
Customer Salary
Tel-no
Credit-limit
Stored as real number
Change storage from real to binary
Email address to be inserted
Assume Personnel file is stored as an indexed file; now, changed
Invoice Program should NOT be affected to hashed file.

Programs using Personnel file should NOT be affected


7 8
Database Users Historical Perspective

¾ End-users: interact with the database applications Evolution of database management systems
Object-Oriented
Hierarchical DBMS
¾ Application programmers DBMS

Deductive
¾ Database administrator (DBA) Conventional Relational DBMS
DBMS
ƒ Deciding information content of database files
ƒ Deciding storage structure and access strategy Distributed
DBMS
ƒ Liaise with users
ƒ Defining security and integrity checks XML
Network
ƒ Backup and recovery strategy DBMS Database
ƒ Monitoring performance

9 10

ANSI/SPARC Architecture ANSI/X3/SPARC Architecture

¾ Schema: Description of a particular collection of data; e.g., End users


university database schema contains student, lecturer,
course descriptions External External External
level view view
external/conceptual mapping
¾ Three-level architecture:
ƒ Internal level: concerns with the way data is actually stored
Conceptual
level Conceptual Schema
ƒ Conceptual level: describes the entire database for whole
community of users conceptual/internal mapping
ƒ External level: represents different views of data for individual users DBMS
Internal
level Internal Schema

Stored Database
11 12
Why is the 3-layer model important? Benefits of Data Independence

¾ Data Independence: programs are insulated from changes ¾ Gives users a simpler 'view' of database
(incl. the way data is structured and stored)
Hotel Bencoolen ¾ Immunity from changes in schema - growth & restructuring

¾ Security

Fountain ¾ Data sharing


of Wealth

EXTERNAL
SCHEMA
CONCEPTUAL SCHEMA 13 14

Example of three levels Typical sequence of events (simplified)


External (PL/1) External (COBOL)
DCL 1 EMPP, 01 EMPC. D DBMS executes
2 EMP# CHAR(6), 02 EMPNO PIC X(6). User issues query B operations
2 SAL FIXED BIN(31); 02 DEPTNO PIC X(4). M
different program's view of the database S
Conceptual definition of entire schema DBMS intercepts
EMPLOYEE
request and
EMPLOYEE_NUMBER CHARACTER(6) analyzes it
DEPARTMENT_NUMBER CHARACTER(4)
SALARY NUMERIC(5) DBMS inspects:
(i) external schema of user,
Internal (ii) external/conceptual mapping,
Internal level - storage issues
STORED_EMP LENGTH=18 (iii) conceptual schema,
PREFIX TYPE=BYTE(6), OFFSET=0
EMP# TYPE=BYTE(6), OFFSET=6, INDEX=EMPX
(iv) conceptual/internal mapping,
DEPT# TYPE=BYTE(4), OFFSET=12 (v) storage def.
15 16
PAY TYPE=FULLWORD, OFFSET=16
Components of a DBMS Classification of DBMS

¾ Data model: A collection of concepts that can be used to


describe the structure (schema) of a database
ƒ The database structure includes data types, relationships, and
constraints.
ƒ Most data models also include a set of basic operations for
specifying retrievals and updates on the database.
e.g. relational, object, network, hierarchical, etc.

¾ Number of users: single user/multi-users

¾ Cost: usually proportional to hardware architecture


Interaction with
Stored Data ¾ General purpose or special purpose
Manager 18

Review

¾ What is a Database? What is a DBMS?


¾ Why use a DBMS?
¾ DBMS users
¾ Historical perspective
¾ ANSI/SPARC Architecture
¾ Components of DBMS
¾ Classification of DBMS

19

Das könnte Ihnen auch gefallen