Professional Documents
Culture Documents
Database Design Using ER Model (14M)
Database Design Using ER Model (14M)
Database Design Using ER Model (14M)
Entity Name
Example
Student
Entity Set
• Groups of the same type of objects are called Entity Types
or Entity Set.
• All Entities in an Entity set have the same set of
attributes.
E1
E2
Entity Set
E3
Attribute Name
Example
Student
Roll no Year
name
Student
Example
Student
This complete table is referred to as “Student Entity Set” and each row
represents an “entity”.
Representation as ER Diagram-
• Composite Attribute :
Attribute value not atomic.
Example :
Address : House_no:City:State
Name : First Name: Middle Name: Last Name
Example
2) Single Valued and Multi Valued attribute
Single Valued
Attribute
Multi Valued
Attribute
3) Null Attributes
• Null value is used when an entity does not have a
value for an attributes.
• Null can also designate that an attribute is
unknown i.e missing or not known.
Roll no
Student
4) Stored and Derived Attributes
• The value for the derived attribute is derived from the
other attribute.
• For example 'Date of birth' of a person is a attribute. The
value for the attribute 'AGE' can be derived by subtracting
the 'Date of Birth'(DOB) from the current date.
• Stored attribute supplies a value to the related attribute.
Notation:
5) Derived Attribute:
An attribute that’s value is derived from a other
attribute.
Notation:
Relationships are represented by a diamond connected to the
related entities in ER Model.
Example
• For example, ‘Enrolled in’ is a relationship type
that exists between entity type Student and
Course.
Example
Relationship Set
• A set of relationships of same type is known as relationship set.
• The following relationship set depicts S1 is enrolled in C2, S2
is enrolled in C1 and S3 is enrolled in C3.
Degree of a relationship set:
The number of different entity sets participating in
a relationship set is called as degree of a
relationship set.
1) Unary Relationship
When there is only ONE entity set participating in a
relation, the relationship is called as unary relationship.
For example, a person is married to only one person.
2) Binary Relationship
Entity Name
2) Weak Entity Set
• 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.
• Discriminator is represented by underlining with a dashed line.
Notation:
• It is represented using a double rectangle.
Entity Name
In ER diagram, weak entity set is always present in
total participation with the identifying relationship
set.
Conclusion
6) Eg: 6) Eg:
Mapping Cardinality Constraints / Ratios (M:N)
• It defines one or more sub class for the super class and
also forms the superclass/subclass relationship.
In the above example, Employee can be specialized as Developer
or Tester, based on what role they play in an Organization.
Summary
• Generalization is a process of forming a generalized super
class by extracting the common characteristics from two or
more classes.
Generalization Specialization
1) It proceeds in a bottom-up manner. 1) It proceeds in a top-down manner.
3) The higher level entity must have lower 3) The higher level entity may not have
level entities. lower level entities.
Show strong entity set, weak entity set, super class and sub
class. (S-19)
Draw the enhanced E-R diagram for College
Management System and show strong entity set,
weak entity set, super class and sub class.(W-19)
Winter-18
1) Draw and name 4 symbols used in ER diagram. (2M)
2) Construct an E-R diagram for a car insurance company whose
customers own one or more cars. Assume suitable attributes. (4M)
3) Draw ER diagram for Banking system, to represent a customer
has account scenario. Identify entities with their attributes and
draw a diagram. (6M)
4) For each of following relationship indicate type of relationship
(1:1, 1:m, m:m) (i) Works in (a relationship between entities dept.
and staff) (ii) Managers (a relationship between entities employee
and Manager) (4M)
Winter-18
5) Draw Enhanced ER diagram for loan payment system.
Consider following entities: (6M)
(i) Loan (Loan_id, Loan_amount, Loan_date)
(ii) Payment (Payment_id, Payment_date, Balance_amount)
(iii) Personal Loan (Personal Loan_no, Interest rate)
(iv) Home Loan (Home loan_no, Interest rate)
Summer-19
Show strong entity set, weak entity set, super class and sub
class.
Winter-19
1) Explain Generalization with example.(4M)
2) Explain different types of attribute with example and
their symbols used in ER diagram. (4M)
3) Draw the symbols used for entity relationship diagram
and write their meaning. (4M)
4) Identify entities and their relationship in terms of tables
for railway reservation system.(6M)
5) Draw the enhanced E-R diagram for College
Management System and show strong entity set, weak
entity set, super class and sub class.(6M)