1 chapter 2. 2 chapter 2 - objectives purpose of three-level database architecture. purpose of...
Post on 19-Dec-2015
229 views
TRANSCRIPT
11
Chapter 2Chapter 2
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.
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.
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.
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.
66
ANSI-SPARC Three-Level ANSI-SPARC Three-Level ArchitectureArchitecture
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.
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.
99
Differences between Three Levels of Differences between Three Levels of ANSI-SPARC ArchitectureANSI-SPARC Architecture
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.
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.
1212
Data Independence and the ANSI-Data Independence and the ANSI-SPARC Three-Level ArchitectureSPARC Three-Level Architecture
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.
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.
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.
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.
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.
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
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.
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.
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.
2222
Components of a DBMSComponents of a DBMS
2323
Components of Database Manager Components of Database Manager (DM)(DM)
2424
Multi-User DBMS ArchitecturesMulti-User DBMS Architectures
• TeleprocessingTeleprocessing
• File-serverFile-server
• Client-serverClient-server
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.
2626
Teleprocessing TopologyTeleprocessing Topology
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.
2828
File-Server ArchitectureFile-Server Architecture
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.
3030
Client-Server ArchitectureClient-Server Architecture
3131
Alternative Client-Server TopologiesAlternative Client-Server Topologies
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).
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
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.
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.
3636
IRDS services interfaceIRDS services interface