1
Chapter 2
DATABASE SYSTEM CONCEPT AND
ARCHITECTURE
• DBMS Architecture
– Tightly integrated systems architecture: the user
interface + DBMS + data are located in one place.
– Client-server system architecture:
User Interface DBMS + Data
Client Module Server Module
Request
Reply
Ala Hamarsheh --
ahamarsheh@aauj.edu
2
• Data Model: a collection of concepts that used to
describe the structure of database.
 Structure: data type, constraints, and relationships.
– We use the data model to achieve some levels of data
abstraction.
– The data model should include a set of basic operations for
retrievals and updates on the DB.
• CATEGORIES OF DATA MODEL:
– High level: provide concepts that are close to the way
users perceive data (SQL).
– Low Level: provide concepts that describe the details
of how data is stored in the computer.
– Representational (implementation) data model:
provide concepts that may be understood by end
users but that are not too far from the way data is
organized within the computer (Entities)
Ala Hamarsheh --
ahamarsheh@aauj.edu
3
• Schemas:
– Any data model should distinguish between the
description of the database and the database itself.
 The description of DB is called DB schema.
– Schema diagram: displays the structure of each
record type, BUT not the actual instances of
records.
StID SNAME CLASS MAJOR
STUDENT
Schema
Construct
This Schema will be
changed Infrequently
Ala Hamarsheh --
ahamarsheh@aauj.edu
4
– Database State: the current set of instances or
occurrences.
 DB State will be changed frequently.
Notes:
 When we define new database we specify DB schema.
 Every time an update operation is applied to DB, we get
another DB state.
 DBMS responsible for ensuring that every state of the
database is a valid state  satisfies the structure and
constrains specified in the database schema.
 DBMS stores the description of the schema constructs
and constrains in the meta-data (catalog files).
 Schema is called intension whereas state is called
extension.
Ala Hamarsheh --
ahamarsheh@aauj.edu
5
THREE SCHEMA ARCHITECTURE:
– Internal Level: to describe the data storage structure
and access paths-typically uses physical data model.
– Conceptual Schema: to describe the structure and
constraints for the whole database.-uses
implementational data model.
– External Level: to describe the various user views.
 We need mapping among these levels.
Ala Hamarsheh --
ahamarsheh@aauj.edu
6
Ala Hamarsheh --
ahamarsheh@aauj.edu
7
DATA INDEPENDENCE:
Changing the schema of one level of the DB system
doesn't require to change the schema of the next higher
levels.
Two types of data independence:
– Logical Data-Independence: the capacity to change
the conceptual schema without having to change the
external schema and their application programs.
– Physical Data-Independence: the capacity to
change the internal schema without having to change
the conceptual schema.
Ala Hamarsheh --
ahamarsheh@aauj.edu
8
DBMS LANGUAGES:
– Data Definition language (DDL): used by DBA or
DB designers to specify the conceptual schema of a
DB.
• In many DBMSs the DDL is also used to define
internal and external schemas.
• In some DBMSs separate storage definition
language (SDL) and view definition language are
used to define internal and external schema.
– Data Manipulation Language (DML): used to
specify database retrievals and updates.
Ala Hamarsheh --
ahamarsheh@aauj.edu
9
DML Commands can be:
1. Embedded in a general purpose programming
language (PL) like Java, Cobol, C++, .. Etc
2. Stand-alone, that applied directly (Query Language).
TWO TYPES OF DML:
– High-Level or Nonprocedural DML: DML
statements must be identified within the program so
that they can be extracted by the pre-compiler and
accessed by DMBS.
– Low-Level or Procedural DML: retrieves individual
records from DB and process each one separately.
 Use Looping
Ala Hamarsheh --
ahamarsheh@aauj.edu
10
Ala Hamarsheh --
ahamarsheh@aauj.edu

Chapter 2 dbChapter 2 dbChapter 2 dbChapter 2 db.ppt

  • 1.
    1 Chapter 2 DATABASE SYSTEMCONCEPT AND ARCHITECTURE • DBMS Architecture – Tightly integrated systems architecture: the user interface + DBMS + data are located in one place. – Client-server system architecture: User Interface DBMS + Data Client Module Server Module Request Reply Ala Hamarsheh -- ahamarsheh@aauj.edu
  • 2.
    2 • Data Model:a collection of concepts that used to describe the structure of database.  Structure: data type, constraints, and relationships. – We use the data model to achieve some levels of data abstraction. – The data model should include a set of basic operations for retrievals and updates on the DB. • CATEGORIES OF DATA MODEL: – High level: provide concepts that are close to the way users perceive data (SQL). – Low Level: provide concepts that describe the details of how data is stored in the computer. – Representational (implementation) data model: provide concepts that may be understood by end users but that are not too far from the way data is organized within the computer (Entities) Ala Hamarsheh -- ahamarsheh@aauj.edu
  • 3.
    3 • Schemas: – Anydata model should distinguish between the description of the database and the database itself.  The description of DB is called DB schema. – Schema diagram: displays the structure of each record type, BUT not the actual instances of records. StID SNAME CLASS MAJOR STUDENT Schema Construct This Schema will be changed Infrequently Ala Hamarsheh -- ahamarsheh@aauj.edu
  • 4.
    4 – Database State:the current set of instances or occurrences.  DB State will be changed frequently. Notes:  When we define new database we specify DB schema.  Every time an update operation is applied to DB, we get another DB state.  DBMS responsible for ensuring that every state of the database is a valid state  satisfies the structure and constrains specified in the database schema.  DBMS stores the description of the schema constructs and constrains in the meta-data (catalog files).  Schema is called intension whereas state is called extension. Ala Hamarsheh -- ahamarsheh@aauj.edu
  • 5.
    5 THREE SCHEMA ARCHITECTURE: –Internal Level: to describe the data storage structure and access paths-typically uses physical data model. – Conceptual Schema: to describe the structure and constraints for the whole database.-uses implementational data model. – External Level: to describe the various user views.  We need mapping among these levels. Ala Hamarsheh -- ahamarsheh@aauj.edu
  • 6.
  • 7.
    7 DATA INDEPENDENCE: Changing theschema of one level of the DB system doesn't require to change the schema of the next higher levels. Two types of data independence: – Logical Data-Independence: the capacity to change the conceptual schema without having to change the external schema and their application programs. – Physical Data-Independence: the capacity to change the internal schema without having to change the conceptual schema. Ala Hamarsheh -- ahamarsheh@aauj.edu
  • 8.
    8 DBMS LANGUAGES: – DataDefinition language (DDL): used by DBA or DB designers to specify the conceptual schema of a DB. • In many DBMSs the DDL is also used to define internal and external schemas. • In some DBMSs separate storage definition language (SDL) and view definition language are used to define internal and external schema. – Data Manipulation Language (DML): used to specify database retrievals and updates. Ala Hamarsheh -- ahamarsheh@aauj.edu
  • 9.
    9 DML Commands canbe: 1. Embedded in a general purpose programming language (PL) like Java, Cobol, C++, .. Etc 2. Stand-alone, that applied directly (Query Language). TWO TYPES OF DML: – High-Level or Nonprocedural DML: DML statements must be identified within the program so that they can be extracted by the pre-compiler and accessed by DMBS. – Low-Level or Procedural DML: retrieves individual records from DB and process each one separately.  Use Looping Ala Hamarsheh -- ahamarsheh@aauj.edu
  • 10.