Nothing Special   »   [go: up one dir, main page]

Model

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 17

Data Model

A data model is an abstract model that describes how data


is represented and accessed in a database
management environment.
In other words a data model is a collection of conceptual
tools for describing data, data relationships, data
semantics and consistency constraints.

The term data model has two generally accepted meanings:

A data model theory, i.e. a formal description of how data


may be structured and accessed.

A data model instance, i.e. applying a data model theory to


create a practical data model instance for some
particular application..
Types of data model
Conceptual (high-level, semantic) data models (Also called
Entity-Based or Object-Based data models.)-: Provide
concepts that are close to the way many users perceive
data. This consists of entity classes (representing kinds of
things of significance in the domain) and relationships

Physical (low-level, internal) data models-: Provide concepts


that describe details of how data is stored in the computer.
This is concerned with partitions, CPUs, table spaces, and
the like.

Implementation (representational) data models (Also called


Record-Based logical model)-: Provide concepts that fall
between the above two, balancing user views with some
computer storage details. This consists of descriptions of
tables and columns, object oriented classes, and XML tags,
among other things.
Conceptual data model
or Object-Based data model
Object based logical models are used in describing data at the
logical & view levels.

Features of conceptual data model include:


 Includes important entities and the relationships among them.
 No attribute is specified.
 No primary key is specified.

At this level, the data modeler attempts to identify the highest-level


relationships among the different entities.

It’s further categorized in different sub models as.


 Entity-Relationship model
 Object-Oriented model
 Semantics data model
 Functional data model
Entity-Relationship
model
The Entity-Relation model (E-R model) is based on
perception of real worlds that consists of collection
of basics objects called Entities, and relationships
among them.
Entities are described in a database by a set of
attributes.
A Relation is an association among several entities

Representation of E-R model is done by following


components
 Rectangles: Represents entity sets
 Ellipses: Represents attributes
 Diamonds: Represents relationships among entities
 Lines: Represents the link between two entities
Representation of E-R
model
Object-Oriented
model
An object-Oriented model is a data model similar to a
E-R model but with an object-oriented database
model: objects, classes and inheritance are directly
supported in database schemas and in the query
language. In addition, it supports extension of the
data model with custom data-types and methods.

Objects that contain the same type of values and the


same methods are grouped together into class. A
class may be viewed as a type of definition for
objects associated.

Unlike entities in E-R model, each object has it’s own


unique identity independent of he values that it
contains. Thus two objects containing the same
values are nevertheless distinct.
Physical data models
A physical data model is a representation of a data
design which takes into account the facilities and
constraints of a given database management
system.

A complete physical data model will include all the


database artifacts required to create relationships
between tables or achieve performance goals, such
as indexes, constraint definitions, linking tables,
partitioned tables or clusters.
The physical data model can usually be used to
calculate storage estimates and may include
specific storage allocation details for a given
database system.
Features of physical data model include:

 Specification of all tables and columns.


 Foreign keys are used to identify relationships
between tables.
 Demoralization may occur based on user
requirements.
 Physical considerations may cause the physical
data model to be quite different from the logical
data model.

At this level, the data modeler will specify how the


logical data model will be realized in the
database schema.
Implementation data model
or Record-Based data model
Record-Based logical models are used to
describing data at logical & view levels.

In contrast to Object-Based data models, they are


used both to specify the over all logical
structure of database as well as description
of the implementations.

In record-based models database is structured in


record formats. Each record types defines a
fixed no of fields, or attributes, and each field
is usually of a fixed length.
Features of Record-Based data model include:

 Includes all entities and relationships among


them.
 All attributes for each entity are specified.
 The primary key for each entity specified.
 Foreign keys (keys identifying the relationship
between different entities) are specified.
 Normalization occurs at this level.

At this level, the data modeler attempts to describe


the data in as much detail as possible, without
regard to how they will be physically
implemented in the database.
The three most widely accepted record-
based data models are as follows-:

 Relational data model

 Network data model

 Hierarchical data model


Relational data model
The Relational model for database management is a
database model based on first-order predicate logic,
The fundamental assumption of the relational model is that all
data is represented as mathematical n-array relations, an
n-array relation being a subset of the Cartesian product of
n domains.

Data are operated upon by means of a relational calculus or


relational algebra, these being equivalent in expressive
power.

The relational model of data permits the database designer to


create a consistent, logical representation of information.
Consistency is achieved by including declared
constraints in the database design, which is usually
referred to as the logical schema.

A relation consists of a heading and a body. A heading is a


set of attributes. A body (of an n-array relation) is a set of
n-tuples. The heading of the relation is also the heading of
each of its tuples.
Network Data model
The network model is a database model conceived as
a flexible way of representing objects and their
relationships.

Data in network model are represented by the collection


of records and the relationship among them are
represented by links. The records in the database
are organized as collection of arbitrary graphs.
Representation of
Network model
Hierarchical model
In a hierarchical data model, data is organized into a
tree-like structure. The structure allows repeating
information using parent/child relationships: each
parent can have many children but each child only
has one parent.

All attributes of a specific record are listed under an


entity type. In a database, an entity type is the
equivalent of a table; each individual record is
represented as a row and an attribute as a column.

Entity types are related to each other using 1: N


mapping, also known as one-to-many
relationships.
Representation of
Hierarchical model

You might also like