
























































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Data Modeling Using the Entity-Relationship (ER) Model
Typology: Slides
1 / 64
This page cannot be seen from the preview
Don't miss anything!

























































ER model was proposed by
ER model was proposed by Peter Chen
Peter Chen in
in
ER model has become the standard tool for
ER model has become the standard tool for
conceptual schema
conceptual schema design
design
ER model consists of three basic constructs:
ER model consists of three basic constructs:
entities
entities ,
attributes
attributes and
and relationships
relationships .
Two types of entities:
Two types of entities:
Strong entity: can exist independently (or
can uniquely identify itself)
Weak entity: existence depends on the
existence of other (strong) entity or
entities
Examples:
Examples:
An employee is a strong entity but the
dependents of the employee could be
weak entities
An account in a bank is a strong entity but
a transaction could be a week entity
An
An
entity type
entity type
defines a set of entities that
defines a set of entities that
have the same attributes.
have the same attributes.
STUDENT is an entity type (Schema)
An
An entity set
entity set is a collection of entities of the
is a collection of entities of the
same entity type
same entity type
Examples:
Examples:
Rema, Ali, Amal, Samer, Rana are entity
set of an entity type STUDENT
Simple
Simple (or
(or atomic
atomic ) attribute is a one which
) attribute is a one which
cannot be divided into smaller parts.
cannot be divided into smaller parts.
Examples:
SSN, GPA, Salary.
Composite
Composite attribute is an attribute which can
attribute is an attribute which can
be divided into smaller subparts, these subparts
be divided into smaller subparts, these subparts
represent more basic attributes with
represent more basic attributes with
independent meanings of their own
independent meanings of their own
Examples:
Name: First_Name, Middle_Name, Last_Name
Address: Street_Address, City, State, Zip code
stored
stored attribute is a one whose value is
attribute is a one whose value is
explicitly stored in the database.
explicitly stored in the database.
e.g. name, birth-date.
Derived
Derived -attributes: whose values are
-attributes: whose values are
computed from other attributes.
computed from other attributes.
Age from Birthdate
Annual Salary from Monthly Salary
NoOfEmployees ==> Count number of
employees in the Employee table.
A relationship type is represented as
A relationship type is represented as diamond-
diamond-
shaped box
shaped box
which is connected by straight lines
which is connected by straight lines
supplies
Sells
The
The role name
role name signifies the role that a
signifies the role that a
participating entity from the entity type
participating entity from the entity type
plays in each relationship instance
plays in each relationship instance
entity
entity e
e plays the role of a
plays the role of a supervisor
supervisor , while
, while
entity
entity e
e plays the role of a
plays the role of a supervisee
supervisee
Supervises
supervisor
supervisor
supervisee
supervisee
e
e
e
e
Specifies the
Specifies the number
number of
of relationship instances
relationship instances
that an entity can participate in
that an entity can participate in
Common cardinality ratios for
Common cardinality ratios for binary
binary
relationship types are
relationship types are
1:N , and
DEPARTMENT Has
Works-on