Lecture 5
Lecture 5
Lecture –5 ER Model
ER MODEL
ER model stands for an Entity-Relationship model. It is a high-level
data model. This model is used to define the data elements and
relationship for a specified system.
It develops a conceptual design for the database. It also develops a
very simple and easy to design view of data.
In ER modeling, the database structure is portrayed as a diagram
called an entity-relationship diagram.
For example, Suppose we design a school database. In this database,
the student will be an entity with attributes like address, name, id,
age, etc. The address can be another entity with attributes like city,
street name, pin code, etc and there will be a relationship between
them.
COMPONENT OF ER
DIAGRAM
➢ ENTITY:
An attribute can have more than one value. These attributes are known
as a multivalued attribute. The double oval is used to represent
multivalued attribute.
For example, a student can have more than one phone number.
❑DERIVED ATTRIBUTE
A weak entity set is an entity set that does not contain sufficient
attributes to uniquely identify its entities. In other words, a primary
key does not exist for a weak entity set. However, it contains a
partial key called as a discriminator. Discriminator can identify a
group of entities from the entity set.
EXTENDED E-R FEATURES –
SPECIALIZATION
An entity set may include sub-groupings of entities that are distinct in some way from other
entities in the set. For instance, a subset of entities within an entity set may have attributes that are
not shared by all the entities in the entity set.
As an example, the entity set person may be further classified as one of the following: employee,
student.
Each of these person types is described by a set of attributes that includes all the attributes of
entity set person plus possibly additional attributes.
For example, : A university divides students into two categories: graduate and undergraduate.
Graduate students have an office assigned to them. Undergraduate students are assigned to a
residential college. Each of these student types is described by a set of attributes that includes all
the attributes of the entity set student plus additional attributes.
An entity set may be specialized by more than one distinguishing feature. A distinguishing
feature among employee entities is the job the employee performs.
In terms of an E-R diagram, specialization is depicted by a hollow arrow-head pointing from the
specialized entity to the other entity. This relationship is the ISA relationship, which stands for “is a”
and represents, for example, that an instructor “is a” employee.
Types of specialization :