Data or ER Models
Data or ER Models
• 2‐fold Process
• Model some part of the Real World
(Miniworld) as DATA
• Determine the OPERATIONS to be used on this
model.
• Both have DBMS independent and DBMS
specific aspects
REQUIREMENTS COLLECTION &ANALYSIS
TRANSACTION IMPLEMENTATION
• Requires at least CONCEPTUAL DB DESIGN
• RESULT: APPLICATION PROGRAMS
Operations Design Process
Combined Design Process
Data Models
Data Model
• A database model defines the logical design of
data. The model also describes the
relationships between different parts of the
data.
• Various types of data models are:
– Object oriented model
– Hierarchical data model
– Relational data model
– Network model
Data Models
• Hierarchical data model: This is called a parent-child
relationship. In this model each entity has only one
parent but several children. At the top of the
hierarchy there is only one entity which is called
Root.
Data Models
• Network model: In a network DBMS every
data item can be related to many others ones.
The database structure is like a graph. This is
similar to the hierarchical model and also
provides a tree-like structure. However, a child
is allowed to have more than one parent.
Data Models
• Relational data model: In relational data model,
data exists in two dimensional tables known as
relations. A relation (table) consists of unique
attributes (columns) and tuples (rows).
Data Models
• Object oriented model: Object based data
models use concepts such as entities,
attributes, and relationships
• The entity relational model( E-R model) has
emerged as one of the main techniques for
modeling database design .
E-R Model
• ER Model is based on:
Entities and their attributes
Relationships among entities
E-R Model components
• Entity: An entity in ER Model is real world entity,
which has some properties called attributes.
Every attribute is defined by its set of values,
called domain. For example, in a school database,
a student is considered as an entity. Student has
various attributes like name, age and class etc.
• An entity set is a collection of similar types of
entities. For example, Students set may contain
all the student of a school.
Attributes
• Attributes describe the properties of the entity of
which they are associated.
• A particular instance of an attribute is a value. For
example, "Ram" is one value of the attribute Name.
• We can classify attributes as following:
¨ Simple
¨ Composite
¨ Single-valued
¨ Multi-valued
¨ Derived
• Simple attribute − Simple attributes are
atomic values, which cannot be divided further.
• For example, a student's phone number is an
atomic value of 10 digits.
• Composite attribute − Composite attributes are
made of more than one simple attribute.
• For example, a student's complete name may
have first_name and last_name.
• Single-Valued Attributes. An attribute is considered single-
valued if there is at most one value associated with it at any one
point in time. For example, suppose "gender" is an attribute in our
design.
borro
wer