Top Banner
Lecture 2 Database Architectures Database Technologies - DAC 2105 By Miss Esha Ramtahal
26
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Database architecture

Lecture 2

Database Architectures

Database Technologies - DAC 2105

By Miss Esha Ramtahal

Page 2: Database architecture

2

Lesson Objectives

• Learn what is the 3 level ANSI-SPARC Database architecture and the idea behind it

• Learn about the multi-user DBMS architectures

• Learn about the major data models

Page 3: Database architecture

3

Content

• 3 level ANSI-SPARC Database architecture

• Multi-User DBMS Architecture– Teleprocessing– File-Server– Client-Server

• Data Models– Hierarchical– Network– Relational

Page 4: Database architecture

4

Introduction

• database = a shared resource• a shared resource => different users• different users => different views of

the data

Example:Database – ID, Name, DOB, Address, Tel, Salary Manager – Name, Age, Tel, Annual SalaryStaff member – Name, Address, DOB, Salary

Page 5: Database architecture

5

3-Level database architecture

• The architecture of most commercial DBMSs is based on the ANSI-SPARC architecture (1975).– American National Standards Institute

(ANSI)– Standards Planning and Requirements

Committee (SPARC)

Page 6: Database architecture

6

3-Level database architecture

• ANSI-SPARC model of a database identifies three distinct levels at which data items can be described:– an external level,– a conceptual level, and– an internal level.

Page 7: Database architecture

8

Analogy – @ Dragon Restaurant

Veg Menu

Non-Veg Menu

SuperMenu

Serving

Fridge

Hungry Customers

Polite Waiter

Busy Chef, cook

Cooking

Raw Vegetables, Fruits, Meat, Fish…World Class

Chef

Page 8: Database architecture

9

Thought Exercise

• What is the importance of the 3 level DB Architecture?

View 1 View 2

ConceptualSchema

External level

Conceptual level

Internal level

Physical data organisation

User 1 User 2

InternalSchema

Database

Hungry Client

Polite Waiter

Busy Chef, cook

Fridge

(Raw Vegetables, Fruits, Meat, Fish…)

Menu @ Dragon Restaurant

Page 9: Database architecture

10

3-Level database architecture

– Independent customised user views…– hide the physical storage details for users…– Enable changes to the physical aspects of

the storage…– Enable changes to the conceptual

structure…

The objective is to separate each user’s views of the database from the way it is physically stored.

Page 10: Database architecture

11

Analogy – @ Dragon Restaurant

Menu 1 Menu 2 Menu 3

Waiter/Chef

Cooking

Serving/Cookingindependence

Menu/Serving independence

Serving

Client/Waiter

Page 11: Database architecture

12

3-Level database architecture

ExternalSchema

ExternalSchema

ExternalSchema

External/Conceptualmapping

Conceptual/Internalmapping

InternalSchema

Physical data independence

Logical data independence

ConceptualSchema

Page 12: Database architecture

13

Multi-User DBMS Architecture

• Teleprocessing• File-Server• Client-Server

Page 13: Database architecture

14

Teleprocessing

• 1 Computer with central processing unit

• N Terminals

• Disadvantage:Huge burden on the central computer

Application programs& DBMS

Page 14: Database architecture

15

File-Server

DatabaseFile-server

Requests for data

Files returned

Workstation 1:App Prgs.& DBMS

Workstation 2:App Prgs.& DBMS

Workstation 3:App Prgs.& DBMS

Page 15: Database architecture

16

File-Server

• Disadvantages:

– Large amount of network traffic– Copy of DBMS required on each

workstation– Concurrency, recovery, and integrity

control are more complex

Page 16: Database architecture

17

Client-Server

DatabaseServer(with DBMS)

Requests for data

Data returned

Client 1:App Prgs.

Client 2:App Prgs.

Client 3:App Prgs.

Page 17: Database architecture

18

Client-Server

• Advantages:

– Reduced network traffic– Hardware cost may be reduced– Increased consistency

Page 18: Database architecture

19

Data Model

An integrated collection of concepts for describing and manipulating:

1.data,2.relationships between

data, and3.constraints on data

in an organisation.

Page 19: Database architecture

20

Components of a Data Model

• Structural part +

• Manipulative part+

• Set of integrity rules

= Data Model

Page 20: Database architecture

21

Major types of Data Model

• Hierarchical data model

• Network data model

• Relational data model

Page 21: Database architecture

22

Hierarchical data model

Library Collection

Author Xx

Author Yy

Database

Book 1o

Book 2o

Book 3o

Author Xx

Author Zz

Software

Book o1

Book o2

Book o3

E.g. collection of books at the library

Each entry has a parent node A parent may have several child nodes Parent-child relationships

Root

Page 22: Database architecture

23

Hierarchical data model

Advantages: Disadvantages:

Conceptual simplicity If a link is broken, the entire branch is lost

Efficiency Considerable redundancy

Page 23: Database architecture

24

Network data model

Software Eng

Maths

Mr. Soft Mr. Ware

BSc Information Technolgy

BSc Business Informatics

Introduction to IT

Mr. Software

Modules

Courses

Lecturers

E.g. CDAC/UOM IT Department

More than one parent per childThus a node may be reached through more than one path.

Page 24: Database architecture

25

Network data model

Advantages: Disadvantages:

Reduced data redundancy

Complicated to build and maintain

Data access flexibility User and programmer must be familiar with the data structure

Page 25: Database architecture

26

Relational Model

• The relational model for database management is a database model based on first order predicate logic, first formulated and proposed in 1969 by E.F.Codd.

» Next week

Page 26: Database architecture

27

Recap

• 3-Level database architectureANSI-SPARC

• Multi-user DBMS architecture:– Teleprocessing– File-Server– Client-Server

• Data Models: – Hierarchical– Network