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
DBMS Architecture and Data Independence
• The Three-Schema Architecture
• Data Independence
Database Languages and Interfaces
• DBMS Languages
• DBMS Interfaces
2
Outline
The Database System Environment
• DBMS Component Modules
• Database System Utilities
• Tools, Application Environments, and Communications Facilities
Classification of Database Management Systems
3
Data Models, Schemas, and
Instances
Data Model
• A collection of concepts that can be used to describe the structure of
a database
• By the structure we mean the data types, relationships, and
constraints that should hold on the data
• Also includes basic operations for specifying retrievals and updates
on the database
• It is becoming more common to include concepts to specify the
dynamic aspect or behavior of a database application
4
Categories of Data Models
Conceptual (high-level)
• Provide concepts that are close to the way many users perceive data
(Also called entity-based, object-based data models)
Physical (low-level)
• Provide concepts that describe details of how data is stored in the
computer
• Meant for computer specialists, not for typical end users
Implementation (representational)
• Provide concepts that may be understood by end users but that are
not too far removed from the way data is organized within the
computer
• Hide some details of data storage but can be implemented on a
computer system in a direct way
5
Schemas, Instances, and DB
State
Database Schema (intension)
• The description of a database
• Not expected to change frequently
Schema Diagram
• A diagrammatic display of (some aspects of) a database schema.
Database State (extension)
• The data in the database at a particular moment of time
• Also called the current set of occurrences or instances
• Every update operation changes the database from one state to
another
6
The Three-Schema Architecture
Internal Schema
• Describes the physical storage structure
• Uses a physical data model
Conceptual Schema
• Describes the structure of the whole database
• Uses a conceptual or an implementation data model
External Schema
• Includes a number user views
• Uses a conceptual or an implementation data model
Mappings
• The process of transforming requests and results between levels
7
The Three-Schema Architecture
8
Data Independence
Logical Data Independence
• The capacity to change the conceptual schema without having to
change the external schema or application programs
Physical Data Independence
• The capacity to change the internal schema without having to
change the conceptual schema
Advantages and disadvantages
• The three -Schema Architecture can make it easier to achieve true
data independence
• Mappings create an overhead during compilation or execution of a
query or a program
• Not implemented fully by DBMSs
9
DBMS Languages
Data Definition Language (DDL)
• Used by the DBA and database designers to define the conceptual
schema of a a database
• In many DBMSs, the DDL is also used to define the internal and
external schemas
• In some DBMSs, separate storage definition (SDL) and view
definition language (VDL) are used to define internal and external
schemas
Data Manipulation Language (DML)
• DML commands can be used as stand-alone (query language) or
can be embedded within a general-purpose language
• Procedural DML - allows user to tell system exactly how to
manipulate data
• Non-Procedural DML - allows user to state what data is needed
rather than how it is to be retrieved
10
DBMS Interfaces
Menu-based Interfaces for Browsing
Forms-based Interfaces
Graphical User Interfaces
Natural Language Interfaces
Interfaces for Parametric Users
Interfaces for The DBA
11
DBMS Component Modules
12
Database System Utilities
Loading
Backup
File Reorganization
Performance monitoring
Other Utilities
• Sorting files
• Handling data compression
• Monitoring access by users
13
Environments, and
Communications Facilities
CASE tools
• Used in the design phase
Expanded Data Dictionary(information repository)
• Stores catalog information about schemas and constraints
• Stores other information such as design decisions, usage standards,
application program descriptions, and user information
Application Development Environments
• Provide an environment for developing database applications
• Include facilities for database design, GUI development, querying
and updating, and application program development
Communications software
• Allow users to access database from remote location
14
Classification of DBMSs
Data Model
Number of Users
Number of Sites
Cost
Types of Access Path
Purpose
15