Chapter2: Database System Concepts
and Architecture
Shayma Alkobaisi
College of Information Technology
United Arab Emirates University
Data Models
• Data abstraction: hiding details of data that is
not useful to most database users
• A data model: collection of concepts used to
describe the structure of a database
– A data model provides the requirements for data
abstraction
– A data model also provides basic operations for
data retrieval and update
Data Models Cont.
• A data model also provides:
– Concepts to specify dynamic aspect or behavior of
database applications
– User defined operations on database objects or
entities
• e.g., COMPUTE_GPA
Categories of Data Models
• High-level or conceptual data model: provides
concepts very similar to the way users
understand data
– Used by typical end users, e.g., ER- models
• Low-level or physical data model: provide
concepts that describe details of how data is
stored
– Used by computer specialist
Categories of Data Models Cont.
• Representational data models is between the
conceptual and the physical data models
– Understood by most users and not hard to
implement
• Representational data models include:
– Relational data models
– Hierarchical data models
– Network data models
Hierarchical data model Example
Network data model Example
Database Schemas and
Instances
• Database schema: the description of a
database defined during design and not
expected to change frequently
• Schema diagram: displayed format
(diagrammatic display) of the schema
• Database instance, database state, or
snapshot: is the data in the database at a
particular moment in time
A schema diagram
Database Schemas Vs.
Instances
• Database schema: defined in the DBMS when
the database is created
• Database state: is initially empty state with no
data
– Initial state is when data is loaded to the database
– Every update operation applied to the database
results in a current state
– DBMS makes sure each database state is a valid
state, i.e., satisfies the structure and constraints
Three-Schema Architecture
• Goal: separate the user application and the physical
database to provide:
– Program-data independence
– Support multiple user views
• Schemas can be defined at three levels:
– Internal level has internal schema describing physical
storage structure
– Conceptual level has conceptual schema that describes
entities, data types and relationships
– External level or view level include external schemas or
user views designed based on interests of particular users
A three-schema architecture diagram
Three-Schema Architecture
Cont.
• The DBMS must transform a request and its
result between the three schema levels
• Mappings among schema levels are needed
• Programs refer to an external schema, are
mapped by the DBMS to the internal schema
for execution
• Data results provided at the internal schema
must be reformatted to match the user’s
external view
Data Independence
• Data independence: the capacity to change the
schema at one level of a database system without
having the change the schema at the next higher
level
• Two types of data independence:
1. Logical data independence: change the conceptual schema
without having to change external schemas
2. Physical data independence: change the internal schema
without having to change conceptual schemas
DBMS Languages
• Data Definition Language (DDL): Used by the DBA and
database designers to specify the conceptual schema of a
database
– In many DBMSs, the DDL is also used to define internal and
external schemas (views)
– In some DBMSs, separate storage definition language (SDL) and
view definition language (VDL) are used to define internal and
external schemas
• Data Manipulation Language (DML): Used to specify
database retrievals and updates
– DML commands (data sublanguage) can be embedded in a general-
purpose programming language (host language), such as COBOL or
PASCAL
– Alternatively, stand-alone DML commands can be applied directly
(query language)
DBMS Interfaces
• Stand-alone query language interfaces
• Programmer interfaces for embedding DML
in programming languages
• Report generation interfaces
• Interfaces for the DBA:
– Creating accounts, granting authorizations
– Setting system parameters
– Changing schemas or access path
DBMS Interfaces Cont.
• User-friendly interfaces:
– Menu-based
– Graphics-based (Point and Click, Drag and Drop
etc.)
– Forms-based
– Natural language
– Speech as Input and Output
– Combinations of the above
Database System Utilities
• DBMSs have utilities that help the DBA in
managing the database system through the
following functions:
– Loading data stored in files into a database
– Backing up the database periodically on tape
– Reorganizing database file structures
– Report generation utilities
– Performance monitoring utilities
– Other functions, such as sorting files, data compression,
monitoring access by users, etc.
Classification of DBMSs
• Based on the data model used:
– Traditional: Relational, Network, Hierarchical
– Emerging: Object-oriented, Object-relational
• Other classifications:
– Single-user (typically used with personal computers) vs. multi-user
(most DBMSs)
– Centralized (uses a single computer with one database) vs.
distributed (uses multiple computers, multiple databases)
• Distributed Database Systems have now come to be known
as client server based database systems because they form a
set of database servers supporting a set of clients
Classification of DBMSs
Cont.
• Based on the purpose:
– General purpose: can be used for different
applications without major changes made
– Special purpose: developed for a specific
application and requires major changes to be
used for a different application
• e.g., online transaction processing (OLTP) systems