Chapter-2 Er-Model Data Model
Chapter-2 Er-Model Data Model
ER-MODEL
Data model:
The data model describes the structure of a database. It is a
collection of conceptual tools for describing data, data relationships
and consistency constraints
Basic concepts:
The E-R data model employs three basic notions : entity sets,
relationship sets and attributes.
Entity sets:
c) Derived Attribute:
The values for this type of attribute can be derived from the
values of existing attributes
eg: age which can be derived from
(currentdate-birthdate)
experience_in_year can be calculated as
(currentdate-joindate)
Relationship sets:
A relationship is an association among several entities.
Consider the two entity sets customer and loan. We define the
relationship set borrow to denote the association between
customers and the bank loans that the customers have.
Mapping Cardinalities:
Mapping cardinalities or cardinality ratios, express the number of
entities to which another entity can be associated via a relationship
set.
Mapping cardinalities are most useful in describing binary
relationship sets, although they can contribute to the description of
relationship sets that involve more than two entity sets.
For a binary relationship set R between entity sets A and B, the
mapping cardinalities must be one of the following:
one to one:
One to many:
Many to one:
An entity in A is associated with at most one entity in B. An entity in B
is associated with any number in A.
1□ M□
Course Faculty
Teach es
Many –to-many:
Entities in A and B are associated with any number of entities from each other.
1□ M□
Customer Depos Account