You are on page 1of 31

Database systems concepts &

architecture
Chapter 2

1
Database system concepts & architecture
 Data abstraction & Data Models
 Schemas, and Instances
 Three-Schema Architecture and Data Independence
 Database System Environment
 Components of DBMS Software
 Centralized and Client/Server Architectures for DBMSs
 Classification of Database Management Systems

2
Data abstraction

A data model is a collection of concepts that can be used to


describe the schema of a database.
A data model provides data abstraction.
Conceptual representation of data is known as data abstraction.

3
Examples of data model

• Entity-relationship model (ER model),


• Relational model,
• Object data model,
• Object-relational model,
• Hierarchical model,
• Network model

(Hierarchical data model & Network data model are called


legacy data model)
4
Category of data model

1) Conceptual data model describes data using concepts such as entities, attributes,
and relationships. e.g. ER model is a high level conceptual data model
2) Physical data model describes how data are actually stored in computer storage
media.
3) Representational or implementation data model
i) falls between PDM and CDM,
ii) describes data in a way that can be mapped to computer storage media. e.g.
relational model, legacy models.

5
Database Schema

The description of a database is called the database schema.

A displayed schema is called a schema diagram.

Each object in a schema diagram is called a schema construct.


(e.g. EMPLOYEE, DEPARTMENT).

A construct is a representation of a concept.


6
Schema diagram of a database

7
Database State

The data in a database at a particular moment in time is called a


database state or database snapshot or database instance.
The schema is sometimes called the intension, and a database
state is called an extension of the schema.
DBMS stores the descriptions of the schema constructs and
constraints (also called meta-data) in the DBMS catalog.

8
9
Three-schema architecture of database

Three important characteristics of DB approach:


(1) self-describing nature of DB.
(2) program-data independence.
(3) support for multi-user views.

Three-schema architecture
• incorporates these characteristics into a DB
• separates application program from physical database
• provides users with different levels of data abstraction

10
Three-schema architecture of database system

Three-schema architecture describes the overall design of a database


at three different levels of abstraction. 11
Three-schema architecture

Three-schema architecture, illustrated in the Figure (last slide),


describes the overall design of a database at three different levels of
abstraction.
1. The internal level has an internal schema, which describes the
physical storage structure of the database. The internal schema
describes the complete details of data storage and access paths
(indexes) for the database.
12
Three-schema architecture

2. The conceptual level has a conceptual schema, which describes the


structure of the whole database for a community of users. The
conceptual schema hides the details of physical storage structures and
concentrates on describing entities, data types, relationships, user
operations, and constraints. Usually, a representational data model is
used to describe the conceptual schema when a database system is
implemented.
13
Three-schema architecture

3. The external or view level includes a number of external schemas


or user views. Each external schema describes the part of the
database that a particular user group is interested in and hides the rest
of the database from that user group.

14
Data independence

Data Independence – ability to change lower level schema without


affecting higher level schema.

Logical data independence - ability to change the conceptual


schema without affecting external schema (view).

Physical data independence – ability to change the physical schema


without affecting conceptual schema (and hence external schema).

Logical data independence is more difficult to achieve than physical


data independence.

15
Database System Environment

DBMS software + OS +
Compiler of programming (host) language

= Database system environment

16
Components of DBMS Software

• DDL compiler processes schema definitions & stores descriptions of the


schemas (meta-data) in the DBMS catalog.
• Query compiler parses a query, validates its correct syntax, name of files,
data elements & converts it into internal form.
• Query optimizer removes redundancy from query, rearranges
operations, generates execution plan, selects the optimal execution plan,
generates executable code & calls runtime database processor.

17
Components of DBMS Software

• Pre-compiler extracts embedded DML statements from application program.


• DML compiler compiles DML statement and converts it into object code.
• Runtime database processor executes
(a) privileged commands
(b) executable query plan
(c) canned transactions with runtime parameters
(d) backup, recovery & concurrency control
• Stored data manager controls access to data & meta-data.

18
Components of DBMS Software

19
Database system utilities

Most DBMS also has database utilities (apart from modules).


Utilities facilitate DBA to manage database system.
• Loading
to load existing data files into the database.
Conversion tool to transfer data from one DBMS into another.
 Backup
to create a backup copy of the database.
(Dump the entire database into tape or other mass storage medium, or
incremental backup)

20
Database system utilities

• Database storage reorganization


to improve performance of a database by reorganizing database files in
different organization and creating indexes.
• Performance monitoring tool
Monitors usage of the database and provides statistics to the DBA.
The DBA uses these statistics to decide whether to reorganize the database
files, whether to create index so as to improve performance of the database
system.

21
Database system utilities

• Other utilities
Sorting files, data compression, monitoring access by users.

22
Centralized DBMS architecture

Entire DBMS software is installed in a single high-end machine

23
Client/Server architecture

A part called client part of the DBMS software is installed in a client


machine & server part installed in server a machine. Two-tier, 3-tier, n-tier.

24
Logical two-tier client/server architecture

25
Logical three-tier client-server architecture

26
Classification of Database Management Systems

1) Classification based on data model –


RDBMS, OODBMS (based on object model), DBS based on hierarchical
model, DBS based on network model
2) Number of users at a time
a) Single-user DBMS – support one user at a time
b) Multi user DBMS – multiple user can access the database
simultaneously
27
Classification of Database Management Systems

3) Number of sites over which the database is distributed.


a) Centralized DBMS– Database stored in a single computer.
b) Distributed DBMS – database and DBMS software distributed
over many sites, connected by a computer network.
Homogeneous DDBMS (Same DBMS at all sites)
Heterogeneous DDBMS (Different DBMS at different sites).
Federated DBS/Multi database system = DDBMS
+ heterogeneous DBMS + participating sites with local
autonomy.

28
Classification of Database Management Systems

4) Special-purpose & general-purpose


Airline reservation system, telephone directory system  special-
purpose DBMS
5) Cost
It is difficult to propose a classification of DBMSs based on cost.
Today we have open source (free) DBMS products like MySQL and PostgreSQL
that are supported by third-party vendors with additional services.

29
Classification of DBMS based on Cost

 The giant systems are being sold in modular form with components to
handle distribution, replication, parallel processing, mobile capability,
and so on, and with a large number of parameters that must be defined
for the configuration.
 Furthermore, they are sold in the form of licenses –
site licenses allow unlimited use of the database system with any
number of copies running at the customer site.
 Another type of license limits the number of concurrent users.

30
Classification of DBMS based on Cost

 Standalone single user versions of some systems like Microsoft


Access are sold per copy or included in the overall configuration
of a desktop or laptop.

31

You might also like