DATA MODELS:A model is an abstraction process .
A data model also called database model
is a mechanism that provides this abstraction
for database application.
It represents the organisation itself.
A data model is a collection of mathematically
well-defined concepts that help an enterprise
to consider and express the static and
dynamic
properties
of
data
intensive
applications.
It consists of the following
1)
Static properties
attributes, relationships.
for
ex;
objects,
2) Dynamic properties for ex; operations or
rules defining new database states.
Data Models can be broadly classified into the
following three categories:
1) Record based data models.
2) Object-based data models.
3) Physical data models.
Record Based Data Models:They are used to specify the overall
logical structures of the database.
In this model the database consists of a
number of fixed-format records possibly of
different types.
There are three record based data models
1) Hierarchical data model
2) Network data model
3) Relational data model
Object Based Data Models:They are used to describe data and its
relationships.
It uses concepts such as entities, attributes
and relationships.
It has flexible data structuring capabilities.
Data integrity constraints can be explicitly
specified.
The following are the common types of
Object-based data models:1) Entity-Relationship model.
2) Semantic Model.
3) Functional model.
4) Object-oriented model.
Physical Data Models:They are used for a higher-level
description of storage structure and access
mechanism.
They describe how data is stored in the
computer.
It is possible to implement the database at
system level using physical data models.
The most common physical models are:1) Unifying model.
2) Frame memory model.
Hierarchical Data Models:The model is represented by an upsidedown tree.
The following figure shows the model
Level0 : Root Parent
(node)
Level1: Root Children
(Segments)
Level2: Segments
(level-1 children)
A tree may be defined as a set of nodes such
that there is one designated node called the
root (node), which is called as the parent
node.
The remaining nodes are partitioned into
disjoint sets and are perceived as children of
the parent.
The parent can have none, one or more
children.
A hierarchical model can represent one-tomany relationship between two entities
where the two are respectively parent and
child.
The nodes of the tree represents record
types.
The traversal of the tree is done in
preorder, inorder, postorder.
The following figure shows a hierarchical
data model of a UNIVERSITY tree type
consisting of three levels and three record
types such as DEPARTMENT, FACULTY AND
COURSE.
The tree contains information about
university academic departments along
with data on all faculties for each
department and all courses taught by each
faculty within a department.
UNIVERSITY
DEPARTMEN
T
FACULTY
COURSE
UNIVERSITY
HIERARCHY
UNIVERSITY
DEPARTMENT
DEPT-CODE
DEPT-NAME
DEPTLOCATION
FCLTY-NAME
FCLTY-SALARY
FACULTY
FC LTY-NO
COURSE
COURSE-CODE COURSE-TITLE
DEPTLOCATION
RECORDS WITH HIERARCHICAL
There is one-to-many (1:M) association
among record instances, moving from the
root to the lowest level of the tree.
Further refinement can be done to the
database by adding information about the
department.
DEPARTMENT
FACULTY
COURSE
SUBJECT
TOPIC
Hierarchical database is one of the
oldest database models used by
enterprise in the past.
Information Management System (IMS),
developed jointly by IBM and North
American
Rockwell
company
for
mainframe computer platform was one
of the first hierarchical databases.
Advantages of Hierarchical Data Model:1) Simplicity:* relationship is simple(logically &
conceptually)
* design is simple
i.e., between various layers .
2) Data Sharing:All data held in a common database
sharing is practical.
3) Data Security:Provided and enforced by DBMS.
first model to provide security.
4) Data Independence:DBMS creates an environment in
which data independence can be
maintained.
Substantially
decreases
the
programming effort and program
maintenance.
5) Data Integrity:given a parent/child relationship , it
always promotes data integrity.
6) Efficiency:It is very efficient when the database
contains a large volume of data in
one-to-many (1:m) relationships.
When the users require large numbers
of transactions using data whose
relationships are fixed over time.
7) Available expertise:Experience programmers are
available.
8) Tried Business applications:tried-and-true business applications
available within the mainframes.
Disadvantages of Hierarchical Data Model:1)
2)
3)
4)
5)
6)
7)
8)
Implementation Complexity
Inflexibility
Database management problems
lack of Structural Independence
Application programming Complexity
Implementation limitation
No standards
Extensive programming efforts.
NETWORK DATA MODEL:The Database Task Group of the
Conference on Data System Languages
(DBTG/CODASYL) formalized the network
data model in the late 1960s.
It is similar to hierarchical model except
that a record can have multiple parents.
It has three basic components such as
record type, data items (or fields) and
links.
It has a owner/member relationship.
M:N or 1:M
LEVEL-0 :
OWNER
LEVEL-1 :
OWNER/MEMBE
R
LEVEL-2:
MEMBER
C
E
SALESREPRESENTA
TIVE
CUSTOMER
1:M
PRODUCT
1:M
INVOICE
1:M
1:M
INVOICELINE
NETWORK DATAMODEL FOR A SALES
1:M
PAYMENT
Advantages of Network Data Model:1) Simplicity:
simple and easy to design
2) Facilitating more relationships types:
in handling one-to-one and many-tomany relationships, which helps in
modeling real life situations.
3) Superior data access:
4) Database Integrity:
5) Data independence:
6) Database Standards:
Disadvantages of Network Data Model:1) System complexity:
2) Absence of structural independence:
3) Not-a-user-friendly:
RELATIONAL DATA MODEL:E.F.Codd of IBM research first introduced
the relational data model in 1970.
The
relational
data
model
is
implemented using very sophisticated
Relational Database Management System
(RDBMS).
It performs the same basic functions of
the hierarchical and network DBMSs plus
with the other functions that make
Relational Data model easy to understand
and implement.
Advantages of Relational Data Model:1) Simplicity
2) Structural Independence
3) Ease of design, implementation,
maintenance and uses.
4) Flexible and powerful query
capability.
Disadvantages of Relational Data
Model:1) Hardware Overheads
2) Ease-to-Design capability leading to
bad design:
ENTITY RELATIONSHIP (E-R) DATA MODEL:It is a logical database model, which has
a logical representation of data for an
enterprise of business establishment.
It is a collection of objects of similar
structures called an entity set.
The relationship between entity sets is
represented on the basis of number of
entities from entity set that can be
associated with the number of entities of
another entity set.
It
has
one-to-one
(1:1),
one-tomany(1:m),
many-to-many(n:m)
relationships .
The following shows building blocks or
symbols to represent E-R diagram.
ENTITY
SET
ATTRIBU
TES
RELATIONS
HIP
LINK BETWEEN
ATTRIBUTE AND
ENTITY SET
MANDATORY
ONE
MANDATORY
MANY
OPTIONAL ONE
OPTIONAL MANY
CUSTNAME
CUST-ID
CUSTADDRE
SS
CUSTOMER
PRODID
PRODDESC
UNITCOST
SUBMIT
S
REQUES
TS
ORDER
ORDDATE
PRODID
PRODQTY
PRODUCT
ADVANTAGES OF E-R DATA MODEL:1) Straightforward relational
representation.
2) Easy conversion for E-R to other
Model.
3) Graphical representation for better
understanding.
Disadvantages of E-R Data Model:1) No industry standard for notation.
2) Popular for high-level design.
OBJECT-ORIENTED DATA MODEL:It is a logical data model that captures
the semantics of objects supported in an
object-oriented programming.
It is a persistent and sharable collection
of defined objects.
It has an ability to model complete
solution.
Object oriented database
represent an entity and a class.
models
A class represents both object attributes
as well as behavior of the entity.
It maintains relationships through logical
containment.
It is based
(data+code).
on
data
encapsulation
The programmers can define new type of
classes(hierarchy).
Advantages of Object-oriented Data
Model:1) Capable of handling a large variety of
data types.
2)
Combining
object-oriented
programming with database technology.
3) Improved productivity
4) Improved data access
Disadvantages of Object-oriented Data
Model:1) No precise definition
2) Difficult to maintain
3) Not suited for all applications.
TYPES OF DATABASE SYSTEMS
The classification of DBMS is greatly
influenced by the underlying computing
system on which it runs, in particular of
computer architecture.
The DBMS can be classified according to
the number of users, the database site
location and expected type and extent of
use.
(a)On the basis of the number of users:
Single-User DBMS
Multi-user DBMS
(b) On the basis of site Locations:
Centralised DBMS
Parallel DBMS
Distributed DBMS
Client/server DBMS
( c ) On the basis of the type and the extent
of use:
Transactional or production DBMS
Decision Support DBMS
Data Warehouse
Centralised Database System:It consists of a single processor together
with its associated data storage devices
and other pheripherals.
It is physically confined to a single
location.
The system offers data processing
capabilities to users who are located either
at the same site, or through remote
terminals, at geographically dispersed
sites.
The management of the system and its data
are controlled centrally from any one or
central site.
The following figure shows an example of
centralised database system.
Local user
#1
remote user
#1
Local user
#2
Local user
#3
Remote user
#2
Local user
#4
Advantages of Centralised Database System
1) Most of the functions such as update,
backup, query, control access are easier to
accomplish
in a centralised database
system.
2) The size of the database and the
computer on which it resides need not have
any bearing on whether the database is
centrally located.
Disadvantages:1)
When the central
database goes down.
computer
or
2)
Communication costs from the
terminals to the central site can be
expensive.
Parallel Database System:It consists of multiple central processing
units (CPUs) and data storage disks in
parallel.
They
improve
processing
input/output (i/o) speeds.
and
Used in applications that have to query
extremely large databases or that have to
process an extremely large number of
transactions per second.
Many different architectures can be used
for parallel systems, which are as follows;
Shared data storage disk
Shared Memory
Hierarchical
Independent resources.
Advantages:1) query extremely large databases, or
have to process an extremely large number
of transactions.
2) The throughput and the response time
are very high.
Disadvantages:1) Startup cost associated, startup cost
may overshadow the actual processing
time, affecting speedup adversely.
2) Since shared resources, a slowdown
may result from interference of each new
process .
Client/Server Database System:1) Clients and servers.
2) Clients (pc or workstations)
3) Servers( large work stations, mini
range computer system or a mainframe)
4)
end.
Client computer is called the front-
5) The server computer is called the
back-end.
Advantages:1) Less expensive
2) Icon-based, menu driven interface
3) more productive work
4) Flexible
5) response time and throughput is high
6) Single database can be shared.
Disadvantages:Labour or programming cost is high.
lack
of
management
tools
for
diagnosis, performance monitoring and
tuning and security control.
Distributed Database system:1) Provides greater efficiency and better
performance.
2) Provide better DBMS performance
3) Response time and throughput is high
4) Shared
5) data volumes and transactions rates
increases, users can grow the system
incrementally.
Disadvantages:Recovery from failure is more complex