You are on page 1of 2

LECTURE 2 Multi-value attribute – Multi-value attributes many-to-one – More than one entities from

may contain more than one values. For entity set A can be associated with the most
INFORMATION MANAGEMENT
example, a person can have more than one one entity of entity set B, however an entity
Entity-Relationship Model phone number, email_address, etc. from entity sat B can be associated with more
than one entity from entity set A.
Entity Relationship

 can be a real-word object either animate or  The association among entities is called a O O
inanimate, that can be easily identifiable. For relationship. For example, an employee
O O
example, in a school database, students, works_at a department, a student enrolls in
teachers, classes, and courses offered can be a course. O O
considered as entities.
Relationship set: O O
 has attributes or properties that give them
their identity. one-to-one – One entity from set A can be
associated with at most one entity of entity set A B
Attributes
B and vice versa.
many-to-many – One entity from A can be
 Entities are represented by means of their
associated with more than one entity from B
properties, called attributes O O
and vice versa.
 All attributes have values. For example, a
O O
student entity may have name, class, and
O O
age as attributes. O O
O O
Types of Attributes O O
O O
Sample attribute – sample attributes are atomic
values which cannot be divided further. For A B
O O
example, a student’s phone number is an one-to-many – One entity from entity set A can
atomic value of 10 digits. be associated more than one entities of entity
A B
set B however an entity from entity set B, can
Composite attribute – Composite attributes are
be associated with at most one entity. ER Diagram
made of more than one simple attribute. For
example, a student’s complete name may have Entity – represented by means of rectangles.
first name and last-named O O
O O Student Teacher Projects
Derived attribute – Derived attributes are the
attributes that do not exist in the physical O O
database, but their values are derived from Attributes – attributes are the properties of
other attributes present in the database. For O O
entities. Attributes are represented by means of
example, average salary in a department should ellipses
not be saved directly in the database, instead it A B
can be derived. For another example, age can O
be derived from data_of_birth.
O
Name BirthDate Derived attributes are depicted by dashed marked as ‘N:1’
ellipse.
LastName
N 1
Student Entity Relationship Entity
FirstName

Name BirthDate
Roll_No.
Many-to-many – The following image reflects
Student that more than one instance of an entity on the
If the attributes are composite, they are further
left and more than one instance of an entity on
divided in a tree like structure. Every node is Age
Roll_No. the right can be associated with the relationship
then connected to its attribute.
PhoneNo.
LastName
N N
FirstName Entity Relationship Entity
Relationships are represented by diamond-
shaped box.
Name BirthDate
One-by-one – When only one instance of an
entity is associated with the relationship, it is
Student marked as ‘1.1’.

Roll_No.
1 1
Entity Relationship Entity
Multivalued attributes are depicted by double
ellipse.
LastName

One-to-many – When more than one instance


FirstName
of an entity is associated with a relationship, it
is marked as ‘1:N’
Name BirthDate

Student 1 N
Entity Relationship Entity
Roll_No.
PhoneNo.
Many-to-one – When more than one instance
of entity is associated with the relationship, it is

You might also like