Fundamental of Database System
Chapter Two
Data base system
architecture
Overview
Data Model
Classification of data models
Schemas and Instances
Database Architecture and database
users
Database Languages
DBMS Interfaces
Classification of DBMS
Data Model:
Is a set of concepts to describe the structure of a database,
and certain constraints that the database should obey.
Data model helps to understand the relationship between
entities and to create the most effective structure to hold
data.
It is a description of the way that data is stored in a
database
Data Model is a collection of tools or concepts for
describing
Data
Data relationships
Data semantics
Data constraints
The main purpose of Data Model is to represent the data in
an understandable way.
Categories of Data
Model
1. High-level Data models:
Provide concepts that are close to the
way people observe data to present the
data.
Example : entity – relationship model
Concepts like entities, attributes, and
relationships.
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 example a works
on relationship between employee
and project.
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
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
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.
Relational model
Weakness of RDBMS
Performance problems associated with
reassembling 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.
2.Record based …
B) Network model
Data are represented by collections of
records.
Relationships among data are
represented by links
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(expensive).
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.
Hierarchical model:
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).
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.
E.g. of Database Schema diagram
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
Example of a database
state
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.
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
Database Architecture
1. 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.
Three –level Architecture
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.
Data Independence
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.
Data Manipulation Language (DML):
Retrieval, insertion, deletion, and
modification of the data.
Database Languages
DBMS Interfaces
Classification of DBMSs
Classification of DBMSs
Design and use of
database
Design and use of
database
Database development
life Cycle
Database development
life Cycle
Database development
life Cycle
Thank You
End
of
Chapter Two