Chapter 2
Database system
architecture
1
Evolution of DBMS Architecture:
◦ Initially, DBMS packages were monolithic systems with tightly
integrated software.
◦ Modern DBMS packages have a modular design with a client/server
system architecture.
◦ Recent data growth has led to distributed architectures with thousands
of computers managing data stores.
Computing Trends:
◦ Trends in computing have shifted from large centralized mainframes
to distributed workstations and personal computers connected via
networks.
◦ Various server types are used, including Web servers, database servers,
file servers, and application servers.
◦ Cloud computing environments now involve thousands of large
servers managing big data for web users.
2
Client/Server DBMS Architecture:
◦ In a basic client/server architecture, system functionality is
distributed between client and server modules.
◦ The client module runs on mobile devices, user
workstations, or PCs and handles user interaction.
◦ The server module manages data storage, access, search,
and other functions.
Functionality Distribution:
◦ Client module: Runs user interfaces like mobile apps or
GUIs for PCs, and application programs accessing the
database.
◦ Server module: Manages data storage, access, search, and
related functions.
3
Data Models, Schemas, and Instances:
Data abstraction
◦ fundamental characteristic of the database approach .
◦ refers to the suppression of details of data organization and storage,
and the highlighting of the essential features for an improved
understanding of data.
◦ Database approach support data abstraction so that different users can
perceive data at their preferred level of detail.
A data model
◦ Is collection of concepts that can be used to describe the structure of a
database.
◦ provides the necessary means to achieve this abstraction.
◦ By structure of a database we mean the:-
Data types,
Relationships, and
Constraints that apply to the data. 4
Data Models, Schemas, and Instances:
◦ Most data models also include a set of basic operations for
specifying retrievals and updates on the database.
◦ In addition to the basic operations provided by the data
model, it is becoming more common to include concepts in
the data model to specify the dynamic aspect or behaviour of
a database application.
◦ This allows the database designer to specify a set of valid
user-defined operations that are allowed on the database
objects.
◦ An example of a user-defined operation could be
COMPUTE_GPA, which can be applied to a STUDENT
object. On the other hand, generic operations to insert, delete,
modify, or retrieve any kind of object are often included in
5
6
Categories of Data Model
1. High-level Data
models/conceptual data model:
Provide concepts that are close to the
way people perceive data to present
the data.
Conceptual data models use concepts
such as entities, attributes, and
relationships.
Example : entity – relationship model
◦ concepts like entities, attributes, and
relationships.
7
entities, attributes, and
relationships
Entity :-represents real-world
objects or concepts (employee,
project).
entity has some attributes
which represents properties of
entity.
◦ Such as employee’s name, address,
birth-date.
A relationship represents
association among entities for
8
Categories of Data Model
2. Record-based Data models
◦ Provide concepts that can be
understood by the user but not too far
from the way data is stored in the
computer.
Three Record-based data models
◦ Relational data model,
◦ Network data model and
◦ Hierarchical data model
9
2.Record based …..
a) Relational data model
◦ Data and relationships are
represented by a collection of
tables.
◦ Each table has a number of columns
with unique names, e.g. customer,
account
10
Relational model
Advantages of RDBMS
◦ Flexible and well-established
◦ used over many years. thus stable,
standardized products available.
◦ Standard data access language
through SQL.
◦ The fundamental structure, i.e., a
table, is easily understood and the
design.
11
Relational model
Weakness of RDBMS
◦ Performance problems associated with re-
assembling simple data structures into
their more complicated real-world
representations.
◦ Lack of support for complex base types,
e.g., drawings
◦ SQL is limited when accessing complex
data.
◦ Knowledge of the database structure is
required to create specific purpose
queries.
12
2.Record based …
b) Network model
Data are represented by
collections of records.
Relationships among data are
represented by links
13
Network model
advantages of a network database :
◦ Efficient representation of some structures
◦ More flexibility than a hierarchical approach
(all relationships can be represented without
redundancy).
◦ allows the modeling of many-to-many
relationships.
Weaknesses of Network Databases :
◦ performance variations (implementations that
perform well for one type of network may perform
poorly for another type)
◦ maintainability (changing relationships may
require physical reorganization of data)
◦ Update overheads. 14
2. Record based …
c) Hierarchical model:
data is represented by a simple
tree structure.
A parent record can have many
child records but a child record
can have only one parent.
There are no many-to-many
relationships between records.
15
Hierarchical model:
16
Hierarchical model:
advantages of a hierarchical database :
◦ Efficient representation of hierarchical structures,
◦ Efficient single key search and access time
◦ Fast update performance where locality of reference
exists
disadvantages of a hierarchical database :
◦ Lack of flexibility (non-hierarchical relationships are
awkward to represent; redundancy may be
required),
◦ Poor performance for non-hierarchical accesses,
◦ Lack of maintainability
(changing R/ship may require physical change of
data).
17
Schemas versus Instances
Database Schema
◦ The description of the Structure of a
database.
Schema Diagram
◦ An illustrative display of (most
aspects of) a database schema.
◦ With out data type and relationships
Schema Construct
◦ Each object of the schema , e.g.,
STUDENT, COURSE.
18
E.g. of Database Schema
diagram
19
Database state(instance)
Database State /database
instance / occurrence / snapshot.
◦ The actual data stored in a database
at a particular moment in time.
The term instance is also applied
to individual database
components.
◦ e.g. record instance,
◦ table instance,
◦ entity instance
20
Example of a database
state
21
Database State….
Database State
◦ Refers to the content of a database
at a moment in time.
Initial Database State
◦ Refers to the database state when it
is initially loaded into the system.
Valid State
◦ A state that satisfies the structure
and constraints of the database.
22
Database Schema vs. Database
State
Distinctions
◦ The database schema changes
very infrequently.
◦ The database state changes every
time the database is updated.
Schema is also called
intension.
State is also called extension
23
Database Architecture
Three –level
Architecture(ANSI/SPARC
Architecture)
◦ Proposed to support DBMS characteristics
of:
Program-data independence.
Support of multiple views of the data.
◦ Its goal is to separate the user
applications and the physical database. 24
Three –level
Architecture
25
Three –level Architecture
a)External level: different views of the
DB
◦ simplifies the interaction b/n user and
system.
b) Conceptual level: describes the
logical structure of the whole database.
◦ hides details of the physical storage
structure.
◦ describes entities, data types, relationships,
constraints and user operations.
c)Internal level: how the data are
actually stored, how to access the data. 26
Data Independence
Data independence:
◦ the ability to modify the schema in one level
without affecting the schema in the higher level.
There are two levels of data
independence
◦ Logical data independence :ability to change
the conceptual schema without causing a change
in the user views or application program .
◦ Physical data independence : ability to
change the internal schema without causing a
change in the conceptual schema or application
program .
◦ Logical data independence is harder to achieve.
27
Database Languages
Data Definition Language (DDL):
◦ This is used to define the conceptual and
internal schemas
◦ Creating and describing the types of
entities, constraints and relationships.
DataManipulation Language
(DML):
◦ retrieval, insertion, deletion, and
modification of the data.
28
Database Languages
Two types of DML
◦ A high-level or non-procedural DML
used on its own to specify complex
database operations in a concise
manner, such as SQL.
◦ A low-level or procedural DML must
be embedded in a general purpose
programming language. such as PL/SQL.
Data Control Language (DCL):
◦ set of commands that generally control
permissions on the data, such as
defining access rights.
29
DBMS Interfaces
Menu-Based Interfaces: present the
user with lists of options,
Forms-Based Interfaces:
displaysa form to each user.
Users can fill out all of the form entries to insert
new data
Graphical User Interfaces:
displays a schema to the user in diagrammatic
form.
GUIs utilize both menus and forms.
Natural Language Interfaces:
accept requests written in English some other
language
has its own "schema," which is similar to the
database conceptual schema. 30
Classification of DBMSs
Based on the Database model
◦ Relational DBMS:
◦ Network DBMS: represents data as record
types and link
◦ Hierarchical DBMS: represents data as
hierarchical tree structures
◦ Object-oriented DBMS: defines a
database in terms of objects, their
properties, and their operations
Based on the number of users
◦ Single-user (typically used with personal
computers)
◦ multi-user (most DBMSs). 31
Classification of DBMSs
Based on the way the data is
stored(Number of Sites)
◦ Centralized (uses a single computer with
one database)
◦ Distributed (uses multiple computers,
multiple databases)
Homogeneous DDBMS(same DBMS software
at multiple sites)
Heterogeneous DDBMS(Federated or
Multidatabase Systems)-several autonomous
preexisting databases.
32
Design and use of
database
Requires the interaction of the
following Five components.
1.Hardware:pcs & servers
2 .Software: DBMS, Application
software ,operating systems
3.Data: Most important of all
components
Two categories of data
◦ Operational
◦ Metadata
33
Design and use of
database
4 Procedure: Rules and regulation
on
◦ How to design and use DB
◦ How to start and stop transactions
◦ How to back up
◦ How to handle hardware and software
failures
◦ How to change structure of the DB
5.People :Who are responsible for
Designing , Implementing , Managing
and using the DB.
34
Database development life
Cycle
DDLC: Major steps in database
development
1.Planning:
◦ Identifying information
gaps/problems in organization
2.Analysis:
◦ Feasibility study
◦ Requirement determinations
35
DDLC..
3.Design : Most important step
Further divided into 3 sub phases
◦ A) conceptual design :
Data description ,data type, Relationships and
constraints
◦ B)Logical design :
Transforming the conceptual data model into
Schema that can be processed by particular
DBMS
◦ C)physical Design:
Implementing the logical Design of the DB with
respect to file structure of the selected DBMS.
36
DDLC…
4) Implementation :
◦ Testing and Deployment of the DB
5) Operation and support:
◦ Administrating and maintaining the
database.
◦ Providing support to users.
37