Professional Documents
Culture Documents
Date: 21-11-2023
LECTURE CONTENTS
Database Systems 3
E-R Model Constructs
• Entities – It is a person, place, object, event, or concept in user environment
about which organization wishes to maintain data
• Person: EMPLOYEE, STUDENT
• Place: STORE, WAREHOUSE, STATE
• Object: MACHINE, BUILDING, AUTOMOBILE
• Event: SALE, REGISTRATION, RENEWAL
• Concept: ACCOUNT, COURSE, WORK CENTER
Database Systems 5
What Should an Entity Be?
• SHOULD BE:
• An object that will have many instances in the database
• An object that will be composed of multiple attributes
• An object that we are trying to model
Database Systems 6
Example of Inappropriate entities
System System
user Inappropriate output
entities
Appropriate
entities
Database Systems 7
Strong Entity Type vs Weak Entity Type
Strong Entity Type:
• It can exists independently of other entity types
• Entity instances of each Strong Entity Type have a unique
characteristics (identifier or key)
• For Example: EMPLOYEE, STUDENT, ORDER, SALE
Weak Entity Type:
• Its existence depends on some other entity type
• It does not have its own identifier
• Represented by double-lined rectangle
• The entity type on which weak entity depends is called
Identify owner
• Identifying Relationship: Relationship between weak entity
and its owner i.e. carries as shown in figure
Database Systems 8
Weak Entity and Identify Owner
Database Systems 9
E-R Model Construct (cont…)
• Relationship – It is an association representing an interaction among
instances of one or more entity types, so it has a verb phrase name
• For Example: EMPLOYEE completes a COURSE. Here complete is a
relationship
Database Systems 10
Relationship Type vs Relationship Instance
Database Systems 11
Basic E-R notation
Entity
Attribute
symbols
symbols
A special entity
that is also a Relationship
relationship symbols
Relationship
degrees
specify number
of entity types Relationship
involved cardinalities
specify how
many of each
entity type is
allowed
Database Systems 12
Attributes
• Attribute–Property or characteristic of an entity or
relationship type. It has a noun name.
• For Example: The attributes of STUDENT entity type can be
Student_ID, Student_Name, Home_Address, Tel_No
• Classifications of attributes:
• Required versus Optional Attributes
• Simple versus Composite Attribute
• Single-Valued versus Multi-valued Attribute
• Stored versus Derived Attributes
• Identifier Attributes
Database Systems 13
A composite attribute
An attribute broken
into component
parts
Derived
Multivalued
from date
an employee can have
employed and
more than one skill
current date
Database Systems 14
Identifiers (Keys)
Database Systems 15
Characteristics of Identifiers
Database Systems 16
Simple Identifier Attribute: An atomic attribute that can’t be
broken down into smaller meaningful components i.e. Student_ID
Composite Identifier Attributes: An attribute that has
meaningful component parts i.e. Flight_ID
Figure 3-9 Simple and composite identifier attributes
The identifier is boldfaced and underlined
17
More on Relationships
Relationship Types vs. Relationship Instances
• The relationship type is modeled as lines between entity
types…the relationship instance is between specific entity
instances
Database Systems 18
Degree of Relationships
• Degree of a relationship is the number of entity types
that participate in it
• Unary Relationship
• Binary Relationship
• Ternary Relationship
Database Systems 19
Degree of Relationships
a) Unary relationships
Database Systems 21
Examples of relationships of different degrees
b) Binary relationships
Database Systems 22
Examples of relationships of different degrees
c) Ternary relationship
Database Systems 23
Sample E-R Diagram
Database Systems 24
REFERENCES
Database System Concepts latest Edition by Abraham
Fundamentals of database by Elmasri, latest edition
Date, C, J.: "An Introduction to Database Systems", latest Edition, Pearson, Boston.
Database Systems 25
THANKS