You are on page 1of 26

Database Technologies - DAC 2105

Lecture 2

Database Architectures

By Miss Esha Ramtahal


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

2
Content

• 3 level ANSI-SPARC Database architecture


• Multi-User DBMS Architecture
– Teleprocessing
– File-Server
– Client-Server
• Data Models
– Hierarchical
– Network
– Relational
3
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 Salary
Staff member – Name, Address, DOB, Salary

4
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)

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

6
Analogy – @ Dragon Restaurant

Veg Non-Veg Super


Menu Menu … Menu Hungry Customers

Serving Polite Waiter

Cooking Busy Chef, cook

Raw Vegetables,
Fridge
World Class Chef Fruits, Meat, Fish…
8
Thought Exercise

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

User 1 User 2 Menu @ Dragon Restaurant


External level Hungry Client
View 1 View 2 …

Conceptual
Schema Polite Waiter
Conceptual level

Internal
Internal level Schema Busy Chef, cook

(Raw Vegetables, Fruits, Meat, Fish…)


Physical data organisation
9

Database Fridge
3-Level database architecture

The objective is to separate each user’s


views of the database from the way it is
physically stored.

– 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…

10
Analogy – @ Dragon Restaurant

Menu 1 Menu 2 Menu 3

Client/Waiter Menu/Serving independence

Serving

Waiter/Chef Serving/Cooking
independence

Cooking

11
3-Level database architecture

External External External


Schema Schema Schema

External/Conceptual Logical data independence


mapping

Conceptual
Schema

Conceptual/Internal Physical data independence


mapping

Internal
Schema

12
Multi-User DBMS Architecture

• Teleprocessing
• File-Server
• Client-Server

13
Teleprocessing

• 1 Computer with central processing unit


• N Terminals
Application
programs
& DBMS
• Disadvantage:
Huge burden on the central computer

14
File-Server

Workstation 3:
Workstation 2:
App Prgs.
App Prgs.
& DBMS
& DBMS
Workstation 1:
App Prgs.
& DBMS

Requests Files returned


for data

Database
File-server 15
File-Server

• Disadvantages:

– Large amount of network traffic


– Copy of DBMS required on each workstation
– Concurrency, recovery, and integrity control
are more complex

16
Client-Server

Client 3:
Client 2:
App Prgs.
App Prgs.

Client 1:
App Prgs.

Requests Data returned


for data

Database
Server 17
(with DBMS)
Client-Server

• Advantages:

– Reduced network traffic


– Hardware cost may be reduced
– Increased consistency

18
Data Model

An integrated collection of concepts for


describing and manipulating:
1. data,
2. relationships between data, and
3. constraints on data
in an organisation.

19
Components of a Data Model

• Structural part
+
• Manipulative part = Data Model
+
• Set of integrity rules

20
Major types of Data Model

• Hierarchical data model

• Network data model

• Relational data model

21
Hierarchical data model

Library
Collection
E.g. collection of books at the library

Database

Each entry has a parent


node
Author Author
Xx Yy
Root
Book 1o Book 2o Book 3o A parent may have
several child nodes
Parent-child
Software

Author
Xx
Author
Zz relationships
Book o1 Book o2 Book o3

22
Hierarchical data model

Advantages: Disadvantages:

 Conceptual simplicity If a link is broken, the entire


branch is lost

 Efficiency Considerable redundancy

23
Network data model

BSc Information BSc Business


Technolgy Informatics
Courses E.g. CDAC/UOM
IT Department

Software Eng Maths Introduction to


Modules IT

Mr. Soft Mr. Ware Mr. Software


Lecturers

More than one parent per child


Thus a node may be reached through more than one path.
24
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

25
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

26
Recap

• 3-Level database architecture


ANSI-SPARC
• Multi-user DBMS architecture:
– Teleprocessing
– File-Server
– Client-Server
• Data Models:
– Hierarchical
– Network
27

You might also like