database management systems cs403 power point slides lecture 04

29
© Virtual University of Pakistan Database Management Systems Lecture - 4

Upload: abu-sayed

Post on 14-Apr-2017

63 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

DatabaseManagement

Systems

Lecture - 4

Page 2: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Today’s Review

Continue 3-L architecture

Data Independence

Different aspect of DBMS

Page 3: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Level 3Internal or Physical

View Concerns about the physical implementation of

the database

Page 4: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Internal ViewDBMS chooses type of data structures

lays out data on storage devices with operating system access methods

Page 5: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Internal ViewInternal record: a single stored record

Does not just contain what we see at the conceptual level

DBMS adds other data

Page 6: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Physical LevelGenerally same as Internal

Actual representation of data on the storage device

In the binary format

OS responsibility

Page 7: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Inter-Schema Mappings

Also a part of 3-level architecture

External/conceptual mapping

Conceptual/Internal

Page 8: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Ext/Con Mapping Specifies mapping between objects in the

external view to those in the logical model

Page 9: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Con/Int Mapping Specifies mapping between objects in the

logical model to those in the physical model-data independence

Page 10: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

3-Level ArchitectureExternal Level

Conceptual Level

Internal Level

Physical Data Organization

Ext/Con Mapping

View 1 View 2 View n

Conceptual Schema

InternalSchema

Database

User 1 User 2 User n

Con/Int Mapping

Page 11: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Name DoB Deps DepId

Rana Aslam 12/09/70 5 D001

Marya Wasti 29/02/80 0 D005

First Name: RanaLast Name: AslamDate of Birth: 12 Sep, 1970

Name: R. AslamAge: 24y,10dDept: Sales

Saleem

Saleema

01110011010011100101001010100101010010101…..

BH RH Rana Aslam 120970 5 D001 RH Marya Wasti…

Page 12: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Data Independence

Page 13: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Data Independence A major outcome of 3-L Arch

The immunity of applications to change in storage structure and access strategy

Page 14: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Changes in lower level do not affect the upper levels

Don’t take it word to word

Mind the direction please

Data Independence

Page 15: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Data Independence Types

• Logical Data Independence

• Physical Data Independence

Page 16: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Logical Data Independence

Changes in conceptual model do not affect the external views

Immunity of external level from changes at conceptual level

Page 17: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Types of Changes Adding a new file/index etc.

Adding a new field in a file

Changing type/size

Deleting an attribute

Page 18: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Physical Data Independence

Changes in the internal model do not affect the conceptual model

Immunity of Conceptual level from changes at Internal level

Page 19: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Changes ExamplesChanging file organization

Index implementation, hash, tree etc.

Changing storage medium

Page 20: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

3-Level ArchitectureExternal Level

Conceptual Level

Internal Level

Physical Data Organization

Ext/Con Mapping

View 1 View n

Conceptual Schema

InternalSchema

Database

User 1 User n

Con/Int Mapping

Conceptual Data Ind

PhysicalData Ind

Page 21: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Functions of DBMS Data Processing

A User Accessible Catalog

Transaction Support

Concurrency Control Services

Page 22: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Functions of DBMS Recovery Services

Authorization Services

Support for Data Communication

Integrity Services

Page 23: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

DBMS EnvironmentsSingle User

Multi-userTeleprocessing

File Servers

Client-Server

Page 24: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Teleprocessing

All processing ata central computer

Dumb Terminals

Page 25: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

File Servers

LAN

File returned Data request

Database

Workstation Workstation

File Server

Page 26: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Client-Server

LAN

Selected data returned Data request

Database

Client Client

Server(with DBMS)

Page 27: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Today’s SummaryCompleted 3-L architecture

Discussed data independence

Discussion on DBMS

Page 28: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

Thanks and Allah Hafiz

Page 29: Database management systems   cs403 power point slides lecture 04

© Virtual University of Pakistan

DatabaseManagement

Systems

Lecture - 4