Sie sind auf Seite 1von 4

TE (CIS)

Database Management Systems (CS-306)

Spring 2014
S. Zaffar Qasim
Assistant Prof (CIS)

DATA MODELS
o What is a model?
An abstract representation of real-world objects and events and
their associations that retains selected details.
For instance, model airplanes and mathematical models.
o What is a data model?
A collection of conceptual tools for describing organization data
(about entities, activities, events), data relationships, data
semantics and consistency constraints.
The purpose of a data model is to represent data and to make the
data understandable. If it does this, then it can be used to design a
database.

o Why a data model is needed?


A schema is written using the DDL of a particular DBMS.
Unfortunately, this type of language is too low-level to describe
the data requirements of an organization in a way that is readily
understandable by a variety of users.
Therefore, we require a high level description of the schema that hides
many low-level storage details; i.e. data model.
A data model is an abstraction from reality and often is simplified
for ease of understanding and manipulation.

o Limitations of data model


It is difficult as well as often unnecessary to capture all the
nuances of the true meaning of data in a data model.
The most difficult part of analyzing organizational data is
recognizing and capturing the meaning of
data and data relationships
for all situations in which the data will be used.
Each type of data model represents certain aspects of the complete
meaning of data fairly well but may not recognize other aspects at all.
The meaning of data is frequently referred to as data semantics.

o Three components of a data model


i.

A structural part, consisting of a set of rules according to which


databases can be constructed;

ii.

A manipulative part, defining the types of operations that are


allowed on the data;

iii.

Possibly a set of integrity rules, which ensures that the data is


accurate.

o Three broad categories of data models:I.


II.
III.

Object-based data models,


Record-based data models and
Physical data models.

The first two are used to describe data at the conceptual and
external levels;
the later is used to describe data at the internal level.

I.

Object-based Data Models


They provide fairly flexible structuring capabilities and allow data
constraints to be specified explicitly.
An object-based data model uses concepts such as entities,
attributes and relationships.
An entity is a distinct object (a person, place or thing, concept or
event) in the organization that is to be represented in the database.
An attribute is a property that describes some aspect of the object
that we wish to record.
A relationship is an association between entities.
In addition to specifying what is to be represented in the database,
they attempt to incorporate some meanings or semantic aspects of
data, such as
explicit representation of objects, attributes and relationships,
categorization of objects,
abstraction and explicit data constraints.

However, these models usually lack the means of specifying


the logical structure of the database.
Some of the more common types of object-based data models are:

Entity-relationship
Semantic
Functional
Object-oriented

II.

Record-based Data Models

Describe the external, conceptual and to some extent, the internal


level of the database.
In contrast to object-based data models, used both to
specify the overall logical structure of the database and
to provide a higher-level description of implementation.
They have been implemented using a variety of database systems.
However, they do not provide much semantic information such as
categorization of objects or relationships, abstraction or data constraints.
In such models, the database consists of a number of fixed-format
records of possibly different types.
Each record type defines a fixed number of fields, each typically
of a fixed length.
The use of fixed-length records simplifies the physical level
implementation of the database.
There are three principal types of record-based logical data model
as follows: The relational data model
The network data model
The hierarchical data model

Relational Data Model

Fig 1: A sample relational database

Network Data Model


In the network model, data is represented as collection of records
and relationships are represented by sets or links.
Compared with the relational model, relationships are explicitly
modeled by the set, which become pointers in the implementation.
The records are organized as generalized graph structures with records
appearing as nodes and sets as edges in the graph.
Fig 2 presents a sample network database using the same
information as in fig 1.
The most popular network database system is Computer
Associates IDMS/R.

Fig 2: A sample network database

Hierarchical Data Model


A restricted type of network model.
Again, data is represented as a collection of records and relationships
are represented by sets.
However, the hierarchical model allows a node to have only one parent.
A hierarchical model can be represented as a tree graph,
with records appearing as nodes, also called segments,
and sets as edges.
The principal hierarchical database system is IBMs IMS, although
IMS also provides non-hierarchical features.

Fig 3: A sample hierarchical database

The network and hierarchical data models still require the user to
have knowledge of the physical database being accessed whereas
the relational provides a substantial amount of data independence.
Hence, while relational systems adopt a declarative approach to
data processing
that is, they specify what data is to be retrieved,
network and hierarchical systems adopt a navigational approach
that is, they specify how the data is to be retrieved.

III.

Physical Data Models

Physical data models describe how data is stored in the computer,


representing information such as record structures, record
orderings and access paths.
There are not as many physical data models as logical data
models, the most common ones being the unifying model and the
frame memory.

Das könnte Ihnen auch gefallen