chapter 2: database system concepts and architecture

15
Chapter 2: Database System Chapter 2: Database System Concepts and Architecture Concepts and Architecture Presentation slides for Presentation slides for DATABASE SYSTEMS DATABASE SYSTEMS by by Muhammad Waheed Aslam Muhammad Waheed Aslam KFUPM KFUPM Information & Computer Science Department Information & Computer Science Department

Upload: holli

Post on 05-Jan-2016

119 views

Category:

Documents


3 download

DESCRIPTION

Chapter 2: Database System Concepts and Architecture. Presentation slides for DATABASE SYSTEMS by Muhammad Waheed Aslam KFUPM Information & Computer Science Department. Outline. Data Models, Schemas, and Instances Categories of Data Models Schemas, Instances, and Database State - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chapter 2:  Database System Concepts and Architecture

Chapter 2: Database SystemChapter 2: Database SystemConcepts and ArchitectureConcepts and Architecture

Presentation slides forPresentation slides for

DATABASE SYSTEMSDATABASE SYSTEMS

byby

Muhammad Waheed AslamMuhammad Waheed Aslam

KFUPMKFUPM

Information & Computer Science DepartmentInformation & Computer Science Department

Page 2: Chapter 2:  Database System Concepts and Architecture

2

OutlineOutline

Data Models, Schemas, and InstancesData Models, Schemas, and Instances• Categories of Data ModelsCategories of Data Models

• Schemas, Instances, and Database StateSchemas, Instances, and Database State

DBMS Architecture and Data IndependenceDBMS Architecture and Data Independence• The Three-Schema ArchitectureThe Three-Schema Architecture

• Data IndependenceData Independence

Database Languages and InterfacesDatabase Languages and Interfaces• DBMS LanguagesDBMS Languages

• DBMS InterfacesDBMS Interfaces

Page 3: Chapter 2:  Database System Concepts and Architecture

3

OutlineOutline

The Database System EnvironmentThe Database System Environment• DBMS Component ModulesDBMS Component Modules

• Database System UtilitiesDatabase System Utilities

• Tools, Application Environments, and Communications FacilitiesTools, Application Environments, and Communications Facilities

Classification of Database Management SystemsClassification of Database Management Systems

Page 4: Chapter 2:  Database System Concepts and Architecture

4

Data Models, Schemas, and Data Models, Schemas, and InstancesInstances

Data ModelData Model• A collection of concepts that can be used to describe the structure of A collection of concepts that can be used to describe the structure of

a databasea database

• By the structure we mean the data types, relationships, and By the structure we mean the data types, relationships, and constraints that should hold on the dataconstraints that should hold on the data

• Also includes basic operations for specifying retrievals and updates Also includes basic operations for specifying retrievals and updates on the databaseon the database

• It is becoming more common to include concepts to specify the It is becoming more common to include concepts to specify the dynamic aspect or behavior of a database applicationdynamic aspect or behavior of a database application

Page 5: Chapter 2:  Database System Concepts and Architecture

5

Categories of Data ModelsCategories of Data Models

Conceptual (high-level)Conceptual (high-level)• Provide concepts that are close to the way many users perceive data Provide concepts that are close to the way many users perceive data

(Also called entity-based, object-based data models)(Also called entity-based, object-based data models)

Physical (low-level)Physical (low-level)• Provide concepts that describe details of how data is stored in the Provide concepts that describe details of how data is stored in the

computercomputer

• Meant for computer specialists, not for typical end usersMeant for computer specialists, not for typical end users

Implementation (representational)Implementation (representational)• Provide concepts that may be understood by end users but that are Provide concepts that may be understood by end users but that are

not too far removed from the way data is organized within the not too far removed from the way data is organized within the computercomputer

• Hide some details of data storage but can be implemented on a Hide some details of data storage but can be implemented on a computer system in a direct waycomputer system in a direct way

Page 6: Chapter 2:  Database System Concepts and Architecture

6

Schemas, Instances, and DB Schemas, Instances, and DB StateState

Database Schema (intension)Database Schema (intension)• The description of a databaseThe description of a database

• Not expected to change frequentlyNot expected to change frequently

Schema DiagramSchema Diagram• A diagrammatic display of (some aspects of) a database schema.A diagrammatic display of (some aspects of) a database schema.

Database State (extension)Database State (extension)• The data in the database at a particular moment of timeThe data in the database at a particular moment of time

• Also called the current set of occurrences or instancesAlso called the current set of occurrences or instances

• Every update operation changes the database from one state to Every update operation changes the database from one state to anotheranother

Page 7: Chapter 2:  Database System Concepts and Architecture

7

The Three-Schema ArchitectureThe Three-Schema Architecture

Internal SchemaInternal Schema• Describes the physical storage structure Describes the physical storage structure

• Uses a physical data modelUses a physical data model

Conceptual SchemaConceptual Schema• Describes the structure of the whole databaseDescribes the structure of the whole database

• Uses a conceptual or an implementation data modelUses a conceptual or an implementation data model

External SchemaExternal Schema• Includes a number user viewsIncludes a number user views

• Uses a conceptual or an implementation data modelUses a conceptual or an implementation data model

MappingsMappings• The process of transforming requests and results between levelsThe process of transforming requests and results between levels

Page 8: Chapter 2:  Database System Concepts and Architecture

8

The Three-Schema ArchitectureThe Three-Schema Architecture

Page 9: Chapter 2:  Database System Concepts and Architecture

9

Data IndependenceData Independence

Logical Data IndependenceLogical Data Independence• The capacity to change the conceptual schema without having to The capacity to change the conceptual schema without having to

change the external schema or application programschange the external schema or application programs

Physical Data IndependencePhysical Data Independence• The capacity to change the internal schema without having to The capacity to change the internal schema without having to

change the conceptual schemachange the conceptual schema

Advantages and disadvantagesAdvantages and disadvantages• The three -Schema Architecture can make it easier to achieve true The three -Schema Architecture can make it easier to achieve true

data independencedata independence

• Mappings create an overhead during compilation or execution of a Mappings create an overhead during compilation or execution of a query or a programquery or a program

• Not implemented fully by DBMSsNot implemented fully by DBMSs

Page 10: Chapter 2:  Database System Concepts and Architecture

10

DBMS LanguagesDBMS Languages

Data Definition Language (DDL)Data Definition Language (DDL)• Used by the DBA and database designers to define the conceptual Used by the DBA and database designers to define the conceptual

schema of a a databaseschema of a a database• In many DBMSs, the DDL is also used to define the internal and In many DBMSs, the DDL is also used to define the internal and

external schemasexternal schemas• In some DBMSs, separate storage definition (SDL) and view In some DBMSs, separate storage definition (SDL) and view

definition language (VDL) are used to define internal and external definition language (VDL) are used to define internal and external schemasschemas

Data Manipulation Language (DML)Data Manipulation Language (DML)• DML commands can be used as stand-alone (query language) or DML commands can be used as stand-alone (query language) or

can be embedded within a general-purpose languagecan be embedded within a general-purpose language• Procedural DML - allows user to tell system exactly how to Procedural DML - allows user to tell system exactly how to

manipulate datamanipulate data• Non-Procedural DML - allows user to state what data is needed Non-Procedural DML - allows user to state what data is needed

rather than how it is to be retrievedrather than how it is to be retrieved

Page 11: Chapter 2:  Database System Concepts and Architecture

11

DBMS InterfacesDBMS Interfaces

Menu-based Interfaces for BrowsingMenu-based Interfaces for Browsing Forms-based InterfacesForms-based Interfaces Graphical User InterfacesGraphical User Interfaces Natural Language InterfacesNatural Language Interfaces Interfaces for Parametric UsersInterfaces for Parametric Users Interfaces for The DBAInterfaces for The DBA

Page 12: Chapter 2:  Database System Concepts and Architecture

12

DBMS Component ModulesDBMS Component Modules

Page 13: Chapter 2:  Database System Concepts and Architecture

13

Database System UtilitiesDatabase System Utilities

LoadingLoading BackupBackup File ReorganizationFile Reorganization Performance monitoringPerformance monitoring Other UtilitiesOther Utilities

• Sorting filesSorting files

• Handling data compressionHandling data compression

• Monitoring access by usersMonitoring access by users

Page 14: Chapter 2:  Database System Concepts and Architecture

14

Tools, Application Tools, Application Environments, and Environments, and Communications FacilitiesCommunications Facilities CASE toolsCASE tools

• Used in the design phaseUsed in the design phase

Expanded Data Dictionary(information repository)Expanded Data Dictionary(information repository)• Stores catalog information about schemas and constraintsStores catalog information about schemas and constraints

• Stores other information such as design decisions, usage standards, Stores other information such as design decisions, usage standards, application program descriptions, and user information application program descriptions, and user information

Application Development EnvironmentsApplication Development Environments• Provide an environment for developing database applicationsProvide an environment for developing database applications

• Include facilities for database design, GUI development, querying Include facilities for database design, GUI development, querying and updating, and application program developmentand updating, and application program development

Communications softwareCommunications software• Allow users to access database from remote locationAllow users to access database from remote location

Page 15: Chapter 2:  Database System Concepts and Architecture

15

Classification of DBMSsClassification of DBMSs

Data ModelData Model Number of UsersNumber of Users Number of SitesNumber of Sites CostCost Types of Access PathTypes of Access Path PurposePurpose