1 chapter 2. 2 chapter 2 - objectives purpose of three-level database architecture. purpose of...

36
1 Chapter 2 Chapter 2

Post on 19-Dec-2015

229 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

11

Chapter 2Chapter 2

Page 2: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

22

Chapter 2 - ObjectivesChapter 2 - Objectives

• Purpose of three-level database architecture.Purpose of three-level database architecture.

• Contents of external, conceptual, and internal levels.Contents of external, conceptual, and internal levels.

• Purpose of external/conceptual and Purpose of external/conceptual and

conceptual/internal mappings.conceptual/internal mappings.

• Meaning of logical and physical data independence.Meaning of logical and physical data independence.

• Distinction between DDL and DML.Distinction between DDL and DML.

• A classification of data models.A classification of data models.

Page 3: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

33

Chapter 2 - ObjectivesChapter 2 - Objectives

• Purpose/importance of conceptual modeling.Purpose/importance of conceptual modeling.• Typical functions and services a DBMS should Typical functions and services a DBMS should

provide.provide.• Software components of a DBMS.Software components of a DBMS.• Meaning of client–server architecture and Meaning of client–server architecture and

advantages of this type of architecture for a DBMS.advantages of this type of architecture for a DBMS.• Function and uses of Transaction Processing Function and uses of Transaction Processing

Monitors.Monitors. • Function and importance of the system catalog.Function and importance of the system catalog.

Page 4: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

44

Objectives of Three-Level Objectives of Three-Level ArchitectureArchitecture• All users should be able to access same All users should be able to access same

data. data.

• A user’s view is immune to changes A user’s view is immune to changes made in other views.made in other views.

• Users should not need to know physical Users should not need to know physical database storage details.database storage details.

Page 5: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

55

Objectives of Three-Level Objectives of Three-Level ArchitectureArchitecture• DBA should be able to change database storage DBA should be able to change database storage

structures without affecting the users’ views.structures without affecting the users’ views.

• Internal structure of database should be Internal structure of database should be unaffected by changes to physical aspects of unaffected by changes to physical aspects of storage.storage.

• DBA should be able to change conceptual DBA should be able to change conceptual structure of database without affecting all users.structure of database without affecting all users.

Page 6: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

66

ANSI-SPARC Three-Level ANSI-SPARC Three-Level ArchitectureArchitecture

Page 7: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

77

ANSI-SPARC Three-Level ANSI-SPARC Three-Level ArchitectureArchitecture

• External LevelExternal Level– Users’ view of the database. Users’ view of the database.

– Describes that part of database that is relevant to a Describes that part of database that is relevant to a particular user.particular user.

• Conceptual LevelConceptual Level– Community view of the database. Community view of the database.

– Describes what data is stored in database and Describes what data is stored in database and relationships among the data. relationships among the data.

Page 8: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

88

ANSI-SPARC Three-Level ANSI-SPARC Three-Level ArchitectureArchitecture

• Internal LevelInternal Level– Physical representation of the database on Physical representation of the database on

the computer. the computer.

– Describes how the data is stored in the Describes how the data is stored in the database. database.

Page 9: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

99

Differences between Three Levels of Differences between Three Levels of ANSI-SPARC ArchitectureANSI-SPARC Architecture

Page 10: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

1010

Data IndependenceData Independence

• Logical Data IndependenceLogical Data Independence– Refers to immunity of external schemas to changes Refers to immunity of external schemas to changes

in conceptual schema.in conceptual schema.

– Conceptual schema changes (e.g. addition/removal Conceptual schema changes (e.g. addition/removal of entities).of entities).

– Should not require changes to external schema or Should not require changes to external schema or rewrites of application programs. rewrites of application programs.

Page 11: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

1111

Data IndependenceData Independence

• Physical Data IndependencePhysical Data Independence– Refers to immunity of conceptual schema to changes Refers to immunity of conceptual schema to changes

in the internal schema.in the internal schema.

– Internal schema changes (e.g. using different file Internal schema changes (e.g. using different file organizations, storage structures/devices).organizations, storage structures/devices).

– Should not require change to conceptual or external Should not require change to conceptual or external schemas.schemas.

Page 12: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

1212

Data Independence and the ANSI-Data Independence and the ANSI-SPARC Three-Level ArchitectureSPARC Three-Level Architecture

Page 13: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

1313

Database LanguagesDatabase Languages

• Data Definition Language (DDL)Data Definition Language (DDL)– Allows the DBA or user to describe and Allows the DBA or user to describe and

name entities, attributes, and relationships name entities, attributes, and relationships required for the applicationrequired for the application

– plus any associated integrity and security plus any associated integrity and security constraints.constraints.

Page 14: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

1414

Database LanguagesDatabase Languages• Data Manipulation Language (DML)Data Manipulation Language (DML)

– Provides basic data manipulation operations on Provides basic data manipulation operations on data held in the database.data held in the database.

• Procedural DML Procedural DML – allows user to tell system exactly how to manipulate allows user to tell system exactly how to manipulate

data.data.

• Non-Procedural DML Non-Procedural DML – allows user to state what data is needed rather than allows user to state what data is needed rather than

how it is to be retrieved.how it is to be retrieved.

Page 15: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

1515

Database LanguagesDatabase Languages

• Fourth Generation Language (4GL)Fourth Generation Language (4GL)– Query LanguagesQuery Languages

– Forms GeneratorsForms Generators

– Report GeneratorsReport Generators

– Graphics GeneratorsGraphics Generators

– Application Generators.Application Generators.

Page 16: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

1616

Data ModelData Model

Integrated collection of concepts for describing Integrated collection of concepts for describing data, relationships between data, and data, relationships between data, and constraints on the data in an organization.constraints on the data in an organization.

• Data Model comprises:Data Model comprises:– a structural part;a structural part;

– a manipulative part;a manipulative part;

– possibly a set of integrity rules.possibly a set of integrity rules.

Page 17: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

1717

Data ModelData Model

• PurposePurpose– To represent data in an understandable way.To represent data in an understandable way.

• Categories of data models include:Categories of data models include:– Object-basedObject-based

– Record-basedRecord-based

– Physical.Physical.

Page 18: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

1818

Data ModelsData Models

• Object-Based Data ModelsObject-Based Data Models– Entity-RelationshipEntity-Relationship– SemanticSemantic– FunctionalFunctional– Object-Oriented.Object-Oriented.

• Record-Based Data ModelsRecord-Based Data Models– Relational Data ModelRelational Data Model– Network Data ModelNetwork Data Model– Hierarchical Data Model.Hierarchical Data Model.

• Physical Data ModelsPhysical Data Models

Page 19: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

1919

Conceptual ModelingConceptual Modeling

• Conceptual schema is the core of a system Conceptual schema is the core of a system supporting all user views.supporting all user views.

• Should be complete and accurate representation Should be complete and accurate representation of an organization’s data requirements.of an organization’s data requirements.

• Conceptual modeling is process of developing a Conceptual modeling is process of developing a model of information use that is independent of model of information use that is independent of implementation details.implementation details.

• Result is a conceptual data model.Result is a conceptual data model.

Page 20: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

2020

Functions of a DBMSFunctions of a DBMS• Data Storage, Retrieval, and Update.Data Storage, Retrieval, and Update.

• A User-Accessible Catalog.A User-Accessible Catalog.

• Transaction Support.Transaction Support.

• Concurrency Control Services.Concurrency Control Services.

• Recovery Services.Recovery Services.

Page 21: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

2121

Functions of a DBMSFunctions of a DBMS• Authorization Services.Authorization Services.

• Support for Data Communication.Support for Data Communication.

• Integrity Services.Integrity Services.

• Services to Promote Data Independence.Services to Promote Data Independence.

• Utility Services.Utility Services.

Page 22: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

2222

Components of a DBMSComponents of a DBMS

Page 23: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

2323

Components of Database Manager Components of Database Manager (DM)(DM)

Page 24: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

2424

Multi-User DBMS ArchitecturesMulti-User DBMS Architectures

• TeleprocessingTeleprocessing

• File-serverFile-server

• Client-serverClient-server

Page 25: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

2525

TeleprocessingTeleprocessing

• Traditional architecture.Traditional architecture.

• Single mainframe with a number of Single mainframe with a number of terminals attached.terminals attached.

• Trend is now towards downsizing.Trend is now towards downsizing.

Page 26: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

2626

Teleprocessing TopologyTeleprocessing Topology

Page 27: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

2727

File-ServerFile-Server• File-server is connected to several workstations across File-server is connected to several workstations across

a network.a network.

• Database resides on file-server.Database resides on file-server.

• DBMS and applications run on each workstation.DBMS and applications run on each workstation.

• Disadvantages include:Disadvantages include:– Significant network traffic.Significant network traffic.– Copy of DBMS on each workstation.Copy of DBMS on each workstation.– Concurrency, recovery and integrity control more complex.Concurrency, recovery and integrity control more complex.

Page 28: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

2828

File-Server ArchitectureFile-Server Architecture

Page 29: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

2929

Client-ServerClient-Server• Server holds the database and the DBMS.Server holds the database and the DBMS.

• Client manages user interface and runs Client manages user interface and runs applications.applications.

• Advantages include:Advantages include:– wider access to existing databases;wider access to existing databases;– increased performance;increased performance;– possible reduction in hardware costs;possible reduction in hardware costs;– reduction in communication costs;reduction in communication costs;– increased consistency.increased consistency.

Page 30: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

3030

Client-Server ArchitectureClient-Server Architecture

Page 31: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

3131

Alternative Client-Server TopologiesAlternative Client-Server Topologies

Page 32: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

3232

Transaction Processing MonitorsTransaction Processing Monitors

• Program that controls data transfer Program that controls data transfer between clients and servers in order to between clients and servers in order to provide a consistent environment, provide a consistent environment, particularly for Online Transaction particularly for Online Transaction Processing (OLTP).Processing (OLTP).

Page 33: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

3333

Transaction Processing Monitor as middle Transaction Processing Monitor as middle tier of a three-tier client-server tier of a three-tier client-server

architecturearchitecture

Page 34: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

3434

System CatalogSystem Catalog

• Repository of information (metadata) Repository of information (metadata) describing the data in the database.describing the data in the database.

• Typically stores:Typically stores:– names of authorized users;names of authorized users;

– names of data items in the database;names of data items in the database;

– constraints on each data item;constraints on each data item;

– data items accessible by a user and the type of access.data items accessible by a user and the type of access.

• Used by modules such as Authorization Used by modules such as Authorization Control and Integrity Checker.Control and Integrity Checker.

Page 35: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

3535

Information Resource Dictionary Information Resource Dictionary System (IRDS)System (IRDS)

• Response to an attempt to standardize Response to an attempt to standardize data dictionary interfaces.data dictionary interfaces.

• Objectives:Objectives:– extensibility of data;extensibility of data;

– integrity of data;integrity of data;

– controlled access to data.controlled access to data.

Page 36: 1 Chapter 2. 2 Chapter 2 - Objectives Purpose of three-level database architecture. Purpose of three-level database architecture. Contents of external,

3636

IRDS services interfaceIRDS services interface