Upload
abhagawan
View
36
Download
2
Tags:
Embed Size (px)
Citation preview
Lecture 2
Database Architectures
Database Technologies - DAC 2105
By Miss Esha Ramtahal
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
3
Content
• 3 level ANSI-SPARC Database architecture
• Multi-User DBMS Architecture– Teleprocessing– File-Server– Client-Server
• Data Models– Hierarchical– Network– Relational
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
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)
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.
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
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
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.
11
Analogy – @ Dragon Restaurant
Menu 1 Menu 2 Menu 3
Waiter/Chef
Cooking
Serving/Cookingindependence
Menu/Serving independence
Serving
Client/Waiter
12
3-Level database architecture
ExternalSchema
ExternalSchema
ExternalSchema
External/Conceptualmapping
Conceptual/Internalmapping
InternalSchema
Physical data independence
Logical data independence
ConceptualSchema
13
Multi-User DBMS Architecture
• Teleprocessing• File-Server• Client-Server
14
Teleprocessing
• 1 Computer with central processing unit
• N Terminals
• Disadvantage:Huge burden on the central computer
Application programs& DBMS
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
16
File-Server
• Disadvantages:
– Large amount of network traffic– Copy of DBMS required on each
workstation– Concurrency, recovery, and integrity
control are more complex
17
Client-Server
DatabaseServer(with DBMS)
Requests for data
Data returned
Client 1:App Prgs.
Client 2:App Prgs.
Client 3:App Prgs.
18
Client-Server
• Advantages:
– Reduced network traffic– Hardware cost may be reduced– Increased consistency
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.
20
Components of a Data Model
• Structural part +
• Manipulative part+
• Set of integrity rules
= Data Model
21
Major types of Data Model
• Hierarchical data model
• Network data model
• Relational data model
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
23
Hierarchical data model
Advantages: Disadvantages:
Conceptual simplicity If a link is broken, the entire branch is lost
Efficiency Considerable redundancy
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.
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
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
27
Recap
• 3-Level database architectureANSI-SPARC
• Multi-user DBMS architecture:– Teleprocessing– File-Server– Client-Server
• Data Models: – Hierarchical– Network