Database System Concepts
and Architecture
1. Data Models, Schemas and Instances
2. Three-Schema Architecture and Data
Independence
3. DBMS Languages
4. The Database System Environment
5. Centralized and Client/Server Architectures for
DBMSs
6.Reference: Elmasri&Navathe Chap. 2.
1
Data Models, Schemas and Instances
●
Data Model
– collection of concepts that can be used to describe the structure of
a database
Categories of Data Models
●
High-level or conceptual data models
– provide concepts that are close to the way many users perceive
data
– Use concepts such as entities, attributes and relationships.
– Example the E-R (Entity-Relationship) data model
●
Representational (or implementation) data models
– Easily understood by end users: relational, object-oriented
●
Low-level or physical data models
– provide concepts that describe the details of how data is stored
on the computer storage media 2
Conceptual models use …
●
Entity
– Represents a real-world object or concept, such as an
employee or a project
●
Attribute
– represents some property of interest that further
describes an entity, such as the employee’s name or
salary
●
Relationship among two or more entities
– Represents an association among the entities, for
example, a works-on relationship between an
employee and a project
– Entity-Relationship model
3
4
Schemas and Database State
Distinguish between the description of the
database and the database itself
●
Database schema
– description of a database; is specified during
database design and is not expected to change
●
Schema diagram
– Displays selected aspects of the schema
Database state or snapshot
– Data in database at a particular moment in time;
current set of occurrences or instances
5
Schema diagram 6
Three-Schema Architecture
Goal: to separate the user applications from the physical
database.
●
Internal level
– It has an internal schema; Describes physical storage structure of the
database
●
Conceptual level
– It has a conceptual schema. Describes structure of the whole database
for a community of users. Usually, a representational data model is
used to describe the conceptual schema when a database system is
implemented. This implementation conceptual schema is often based
on a conceptual schema design in a high-level data model.
●
External or view level
– It includes a number of external schemas or user views. Describes part
of the database that a particular user group is interested in and hides
the rest of the database from that user group. Each external schema is
typically implemented using a representational data model, possibly
based on an external schema design in a high-level data model. 7
Three-schema architecture 8
DBMS Languages
●
The DBMS must provide appropriate languages
and interfaces for each category of users.
●
Data definition language (DDL)
– Defines both schemas, conceptual and internal
●
Storage definition language (SDL)
– Specifies the internal schema
●
View definition language (VDL)
– Specifies user views/mappings to conceptual schema
●
Data manipulation language (DML)
– Allows retrieval, insertion, deletion, modification
9
Centralized and Client/Server Architectures for DBMSs
●
Centralized DBMSs Architecture
– All DBMS functionality, application program
execution, and user interface processing carried out
on one machine
10
Databases
●
Basic client/server DBMS Architecture
– System functionality distributed in two types
●
Client Module
– It runs on a personal computer or workstation
– Application programs and GUIs that access the
database run in the client module
●
Server Module
– handles data storage, access, search, and other
functions
11
Basic Client/Server Architectures
●
Servers with specific functionalities
– File server
●
Maintains the files of the client machines.
– Printer server
●
Connected to various printers; all print requests by the
clients are forwarded to this machine
– Web servers or e-mail servers
●
Client machines
– Provide user with:
●
Appropriate interfaces to utilize these servers
●
Local processing power to run local applications
12
Two-tier Client/Server Architectures for DBMSs
●
Client
– User machine that provides user interface capabilities
and local processing
●
Server
– System containing both hardware and software
– Provides services to the client machines
●
Such as file access, printing, archiving, or database access
●
Server handles
– Query and transaction functionality related to SQL
processing
●
Client handles
– User interface programs and application programs 13
Two-tier client/server 14
●
Open Database Connectivity (ODBC)
– Provides application programming interface (API)
– Allows client-side programs to call the DBMS
●
Both client and server machines must have the necessary
software installed
●
JDBC
– Allows Java client programs to access one or more
DBMSs through a standard interface
15
Three-Tier and n-Tier Architectures for Web Applications
●
Application server or Web server
– Adds intermediate layer between client and the
database server
– Runs application programs and stores business rules
●
N-tier
– Divide the layers between the user and the stored
data further into finer components
16
Logical three-tier client/server 17