0% found this document useful (0 votes)
6 views74 pages

Chapter Two

Chapter Two of the Fundamentals of Database Systems focuses on conceptual database design using E-R modeling. It covers key concepts such as E-R diagrams, attributes, relationships, weak entity sets, cardinality constraints, and participation constraints, providing examples and exercises for practical understanding. The chapter emphasizes the importance of these concepts in the effective design and implementation of database management systems.

Uploaded by

galgalokonso5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views74 pages

Chapter Two

Chapter Two of the Fundamentals of Database Systems focuses on conceptual database design using E-R modeling. It covers key concepts such as E-R diagrams, attributes, relationships, weak entity sets, cardinality constraints, and participation constraints, providing examples and exercises for practical understanding. The chapter emphasizes the importance of these concepts in the effective design and implementation of database management systems.

Uploaded by

galgalokonso5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 74

Fundamentals of Database Systems (ITEC 2071)

Chapter Two-
Conceptual Database
Design E-R modeling

Information Technology
Jimma Institute of Technology
 Outline
Looping
• Basic concept of E-R diagram
• Types of Attributes
• Weak Entity Sets
• Cardinality Constraints
• Participation Constraints
• Structural Constraints
• Extended E-R features
• Subclass/superclass
• Generalization and Specialization
• Constraints on Specialization and Generalization
• Aggregation
• Limitation of ER Diagram
• Mapping E-R into Database Schema
Basic concept of E-R diagram
Section - 1
Basic concepts
 Conceptual modeling is a very important phase in designing a successful
database application.
 What is Database Design?
 Database Design is a collection of processes that facilitate the designing, development,
implementation and maintenance of enterprise database management systems.
 What is E-R diagram?
 E-R diagram: (Entity-Relationship diagram)
 It is graphical (pictorial) representation of database.
 It uses different types of symbols to represent different objects of database.

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

4
Example COMPANY Database
▪ The COMPANY database keeps track of a company’s employees, departments, and projects.

▪ Suppose that after the requirements collection and analysis phase, the database designers provide the
following description of the mini-world the part of the company that will be represented in the
database.

▪ The company is organized into departments.

▪ Each department has a unique name, a unique number, and a particular employee who manages
the department.

▪ We keep track of the start date when that employee began managing the department. A department may have several
locations.

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

5
Example COMPANY Database…
▪ A department controls a number of projects, each of which has a unique name, a unique number, and
a single location.

▪ We store each employee’s name, Social Security number, address, salary, sex (gender), and birth
date.

▪ An employee is assigned to one department, but may work on several projects, which are not
necessarily controlled by the same department.

▪ We keep track of the current number of hours per week that an employee works on each project.

▪ We also keep track of the direct supervisor of each employee (who is another employee).

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

6
Example COMPANY Database…
▪ We want to keep track of the dependents of each employee for insurance purposes.

▪ We keep each dependent’s first name, sex, birth date, and relationship to the employee.

▪ This database application can be displayed by means of the graphical notation known as ER diagrams.

▪ We describe the step-by-step process of deriving this schema from the stated requirements and explain the ER
diagrammatic notation as we introduce the ER model concepts.

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

7
ER diagram for the COMPANY database

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

8
Entity
 An entity is a person, a place or an object.
 An entity is represented by a rectangle which contains the name of an entity. Entity Name

 Entities of a college database are: Symbol


 Student
 Professor/Faculty
 Course
 Department
 Result Student Faculty Course
 Class
 Subject

Exercise Write down the different entities of bank database.

Exercise Write down the different entities of hospital database.


Fundamentals of Database Systems
Chapter Two – Conceptual Database Design E-R modeling

9
Entity Set
 It is a set (group) of entities of same type.
 Examples:
 All persons having an account in a bank
 All the students studying in a college
 All the professors working in a college
 Set of all accounts in a bank

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

10
Attributes
 Attribute is properties or details about an entity.
Attribute
 An attribute is represented by an oval containing name of an attribute. Name
 Attributes of Student are: Symbol
 Roll No
 Student Name
 Branch RollNo Name
 Semester
 Address
 Mobile No Student
 Age
 SPI
 Backlogs
Exercise Write down the different attributes of Faculty entity.

Exercise Write down the different attributes of Account entity.


Fundamentals of Database Systems
Chapter Two – Conceptual Database Design E-R modeling

11
Relationship
 Relationship is an association (connection) between several entities.
 It should be placed between two entities and a line connecting it to an entity.
 A relationship is represented by a diamond containing relationship's name.

Relationship
Name

Symbol

Student Issue Book

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

12
E-R Diagram of a Library System

Primary Key Primary Key


Attributes
RollNo Name BookNo Name
Relationship

Student Issue Book

Branch Sem Entities Author Price

Each and every entity must have one primary key attribute.
Relationship between 2 entities is called binary relationship.

Fundamentals of Database Systems


Chapter Two –Conceptual Database Design E-R modeling
13
Ternary Relationship
ProjectID Project Name

Project

FacID Name RollNo Name

Faculty Guide Student

Branch Technology Branch Sem

Relationship between 3 entities is called ternary relationship.


Fundamentals of Database Systems
Chapter Two –Conceptual Database Design E-R modeling
14
Exercise
 Draw an E-R diagram of following pair of entities
 Customer & Account
 Customer & Loan
 Doctor & Patient
 Student & Project
 Student & Teacher
▪ Note: Take four attributes per entity with one primary key attribute.
Keep proper relationship between two entities.

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

15
Types of Attributes
Section - 2
Types of Attributes

Simple Attribute Composite Attribute


Cannot be divided into subparts Can be divided into subparts
E.g. RollNo E.g. Name
(first name, middle name, last name)
Address
(street, road, city)
Symbol Symbol Name

Roll No First name Last name

Middle name

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

17
Types of Attributes

Single-valued Attribute Multi-valued Attribute


Has single value Has multiple (more than one) value
E.g. RollNo E.g. PhoneNo
(person may have multiple phone nos)
EmailID
(person may have multiple emails)
Symbol Symbol

Roll No Phone No

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

18
Types of Attributes

Stored Attribute Derived Attribute


It’s value is derived or calculated from
It’s value is stored manually in database
other attributes
E.g. Birthdate E.g. Age
(can be calculated using current date and
birthdate)
Symbol Symbol
Birthdate Age

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

19
Entity with all types of Attributes

Middle
Name
First Name Last Name
Single
Simple
Value
RollNo Name Composite Apartment
Derived Composite

Age Student Address Street

Multiple Stored
Value
Phone No Birth Date Area

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

20
Exercise
 Draw an E-R diagram of Banking Management System.
 Draw an E-R diagram of Hospital Management System.
 Draw an E-R diagram of College Management System.
 Take only 2 entities
 Keep proper relationship between two entities
 Use all types of attributes

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

21
Descriptive Attribute
 Attributes of the relationship is called descriptive attribute.

Descriptive
Attribute

Issue
RollNo Name Date BookNo Name

Student Issue Book

Branch Sem Author Price

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

22
Role
 Roles are indicated by labeling the lines that connect diamonds (relationship) to rectangles
(entity).
 The labels “Coordinator” and “Head” are called roles; they specify Faculty entities interact with
whom via Reports_To relationship set.
 Role labels are optional, and are used to clarify semantics (meaning) of the relationship.

EmpID Name

Coordinator
Faculty Reports_To
Head

Branch Experience

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

23
Recursive Relationship Set
 The same entity participates in a relationship set more than once then it is called recursive
relationship set.

FacID FName DeptID DName

Faculty Works Department

Post Recursive
Relationship
FName Post Set DName
Ajay Professor Prof. Computer
Haresh Professor Civil
Ramesh HOD Mechanical
Fundamentals of Database Systems
Chapter Two – Conceptual Database Design E-R modeling

24
Weak Entity Set
Section - 3
Weak Entity Set
 An entity set that does not have a primary key is called weak entity set.

Payment-date

loan-no amount payment-no Payment-amount

loan L_P payment

Strong Entity Weak Entity Weak Entity


Set Relationship Set

• Weak entity set is indicated by double rectangle.


• Weak entity relationship set is indicated by double diamond.
Fundamentals of Database Systems
Chapter Two –Conceptual Database Design E-R modeling
26
Weak Entity Set
 The existence of a weak entity set depends on the existence of a strong entity set.
 The discriminator (partial key) of a weak entity set is the set of attributes that distinguishes all
the entities of a weak entity set.
 The primary key of a weak entity set is created by combining the primary key of the strong
entity set on which the weak entity set is existence dependent and the weak entity set’s
discriminator.
 We underline the discriminator attribute of a weak entity set with a dashed line.
 Payment entity has payment-no which is discriminator.
 Loan entity has loan-no as primary key.
 So primary key for payment is (loan-no, payment-no).

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

27
Cardinality Constraints
Section - 4
Mapping Cardinality (Cardinality Constraints)
 It represents the number of entities of another entity set which are connected to an entity
using a relationship set.
 It is most useful in describing binary relationship sets.
 For a binary relationship set the mapping cardinality must be one of the following types:
 One to One
 One to Many
 Many to One
 Many to Many

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

29
One-to-One relationship (1 – 1)
 An entity in A is associated with only one entity in B and an entity in B is associated with only
one entity in A.

customer borrow loan


A1 B1
C1 L1
A2 B2
C2 L2

C3 L3
A B

 Example: A customer is connected with only one loan using the relationship borrower and a
loan is connected with only one customer using borrower.

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

30
One-to-Many relationship (1 – N)
 An entity in A is associated with more than one entities in B and an entity in B is associated
with only one entity in A.

customer borrow loan


A1 B1
C1 L1
A2 B2
C2 L2

C3 L3
A B
L4

 Example: A loan is connected with only one customer using borrower and a customer is
connected with more than one loans using borrower.
Fundamentals of Database Systems
Chapter Two – Conceptual Database Design E-R modeling

31
Many-to-One relationship (N – 1)
 An entity in A is associated with only one entity in B and an entity in B is associated with more
than one entities in A.

customer borrow loan


A1 B1
C1 L1
A2 B2
C2 L2

C3 L3
A B
C4

 Example: A loan is connected with more than one customer using borrower and a customer is
connected with only one loan using borrower.
Fundamentals of Database Systems
Chapter Two – Conceptual Database Design E-R modeling

32
Many-to-Many relationship (N – N)
 An entity in A is associated with more than one entities in B and an entity in B is associated
with more than one entities in A.

customer borrow loan


A1 B1
C1 L1
A2 B2
C2 L2

C3 L3
A B
C4 L4

 Example: A customer is connected with more than one loan using borrower and a loan is
connected with more than one customer using borrower.
Fundamentals of Database Systems
Chapter Two – Conceptual Database Design E-R modeling

33
Mapping Cardinality (Cardinality Constraints) [Exercise]
 Draw an E-R diagram and specify which type of mapping cardinality will be there in the
following examples:
 Each customer has only one account in the bank and each account is held by only one customer. [single
account]
 Each customer has only one account in the bank but an account can be held by more than one customer.
[joint account]
 A customer may have more than one account in the bank but each account is held by only one customer.
[multiple accounts]
 A customer may have more than one account in the bank and each account is held by more than one
customer. [join account as well as multiple accounts]
 A student can work in more than one project and a project can be done by more than one student.
 A student can issue more than one book but a book is issued to only one student.
 A subject is taught by more than one faculty and a faculty can teach more than one subject.

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

34
Participation Constraints
Section - 5
Participation Constraints
 It specifies the participation of an entity set in a relationship set.
 There are two types participation constraints
 Total participation
 Partial participation

Partial participation Total participation


• some entities in the entity set may not participate in • every entity in the entity set participates in at least
any relationship in the relationship set. one relationship in the relationship set.
• indicated by single line • indicated by double line

customer borrow loan

C1 L1
Each customer has
maximum one loan C2 L2
Fundamentals of Database Systems
C3Chapter Two – Conceptual Database Design E-R modeling
36
Structural Constraints
Section - 6
Structural Constraints
▪ Specified on each participation of an entity type E in a relationship type R

▪ Specifies that each entity e in E participates in at least min and at most max relationship instances in R

▪ Default(no constraint): min=0, max=n

▪ Must have minmax, min0, max 1

▪ Derived from the knowledge of mini-world constraints

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

38
Examples
 A department has exactly one manager and an employee can manage at most one department.
 Specify (1,1) for participation of DEPARTMENT in MANAGES

 Specify (0,1) for participation of EMPLOYEE in MANAGES

 An employee can work for exactly one department but a department can have any number of

employees.
 Specify (1,1) for participation of EMPLOYEE in WORKS_FOR

 Specify (1,N) for participation of DEPARTMENT in WORKS_FOR

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

39
The (min,max) notation relationship constraints

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

40
Enhanced-ER
Section - 7
Enhanced-ER (EER) Model Concepts

 EER model includes all modeling concepts of basic ER

 Additional concepts:
 subclasses/super classes

 specialization/generalization

 Constraints on Specialization and Generalization

 Aggregation

 The resulting model is called the enhanced-ER or Extended ER (E2R or EER) model

 It is used to model applications more completely and accurately if needed.

 It includes some object-oriented concepts, suchof Database


Fundamentals as inheritance
Systems
Chapter Two – Conceptual Database Design E-R modeling

42
Superclass v/s Subclass
Section - 8
Superclass v/s Subclass

Super Class Sub Class


A superclass is an entity from which another A subclass is an entity that is derived from
entities can be derived. another entity.
E.g, E.g,
an entity account has two subsets saving_account and current_account entities
saving_account and current_account are derived from entity account.
So an account is superclass. So saving_account and current_account are
subclass.
Account Super Class

Saving_Account Current_Account

Fundamentals of Database Systems


Sub
Chapter Two – Conceptual Database Class
Design E-R modeling

44
Generalization v/s Specialization
Section - 9
Generalization v/s Specialization
Generalization Specialization
It extracts the common features of multiple It splits an entity to form multiple new entities
entities to form a new entity. that inherit some feature of the splitting entity.
Name Address Name Address

SPI Salary
Person Person
Name Name
ISA ISA
Address Address

Top-down approach
Bottom-up approach

Student Faculty Student Faculty

SPI Salary SPI Salary


Fundamentals of Database Systems
Chapter Two – Conceptual Database Design E-R modeling

46
Generalization v/s Specialization
Generalization Specialization
The process of creation of group from various The process of creation of sub-groups within
entities is called generalization. an entity is called specialization.
It is Bottom-up approach. It is Top-down approach.
The process of taking the union of two or more The process of taking a sub set of higher level
lower level entity sets to produce a higher level entity set to form a lower level entity set.
entity set.
It starts from the number of entity sets and It starts from a single entity set and creates
creates high level entity set using some different low level entity sets using some
common features. different features.

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

47
Generalization & Specialization example

Name Address

PID City
Person

ISA

Salary Employee Customer Balance

ISA

Full Time Part Time

Days Worked Hour Worked


Fundamentals of Database Systems
Chapter Two – Conceptual Database Design E-R modeling

48
Exercise
 Give the examples of Generalization/Specialization in the following E-R diagram:
 Hospital Management System.
 College Management System.
 Bank Management System.
 Insurance Company.

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

49
Constraints on
Specialization and Generalization
Section - 10
Constraints on Specialization and Generalization

Constraints

Disjoint Participation

Non-disjoint Total Partial


Disjoint
(Overlapping) (Mandatory) (Optional)
Fundamentals of Database Systems
Chapter Two – Conceptual Database Design E-R modeling

51
Disjoint Constraint
 It describes relationship between members of the superclass and subclass and
indicates whether member of a superclass can be a member of one, or more than
one subclass.
 Types of disjoint constraints
 Disjoint Constraint
 Non-disjoint (Overlapping) Constraint

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

52
Disjoint Constraint
 It specifies that the entity of a super class can belong to only one lower-level entity set (sub
class).
 Specified by ‘d’ or by writing disjoint near to the ISA triangle.
Employee
Cricketer (Super class)
(Super class)

Disjoint
Batsman Bowler ISA
(Sub class) (Sub class)

Full-time Part-time
(Sub class) (Sub class)

Fundamentals of Database Systems


All the players are associated with only oneChapter
sub class either (Batsman or Bowler).
Two – Conceptual Database Design E-R modeling

53
Non-disjoint (Overlapping) Constraint
 It specifies that an entity of a super class can belong to more than one lower-level entity set
(sub class).
 Specified by ‘o’ or by writing overlapping near to the ISA triangle.
Employee
Cricketer (Super class)
(Super class)

Non-disjoint
Batsman Bowler ISA
(Sub class) (Sub class)

Faculty Head
(Sub class) (Sub class)

Fundamentals of Database Systems


One player (Yuvraj singh) is associated withChapter
moreTwothan one sub class.
– Conceptual Database Design E-R modeling

54
Constraints on Specialization and Generalization

Constraints

Disjoint Participation

Non-disjoint Total Partial


Disjoint
(Overlapping) (Mandatory) (Optional)
Fundamentals of Database Systems
Chapter Two – Conceptual Database Design E-R modeling

55
Participation (Completeness) Constraint
 It determines whether every member of super class must participate as a
member of subclass or not.
 Types of participation (Completeness) Constraint
 Total (Mandatory) participation
 Partial (Optional) participation

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

56
Total (Mandatory) Participation
 Total participation specifies that every entity in the superclass must be a member of some
subclass in the specialization.
 Specified by a double line in E-R diagram.
Employee
Cricketer (Super class)
(Super class)

Batsman Bowler ISA


(Sub class) (Sub class)

Professor Head
(Sub class) (Sub class)

Fundamentals of Database Systems


All the players are associated with minimumChapter
oneTwosub class either (Batsman or Bowler).
– Conceptual Database Design E-R modeling

57
Partial (Optional) Participation
 Partial participation specifies that every entity in the super class does not belong to any of the
subclass of specialization.
 Specified by a single line in E-R diagram.
Employee
Cricketer (Super class)
(Super class)

Batsman Not associated with Bowler ISA


(Sub class) any sub class (Sub class)

Professor Head
(Sub class) (Sub class)

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

58
Specialization / Generalization Example (UNIVERSITY)

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

59
Limitation of E-R diagram
Section - 11
Limitation of E-R diagram
 In E-R model we cannot express relationships between two relationships.

Relation 1 Relation Relation 2

Entity 1 Relation Entity 2

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

61
Limitation of E-R diagram

Customer
Company

Employee Works Department


Customer
Can not connect two relationship

Borrow Borrow

Loan Loan

Process of creating an entity by combining various components of


E-R diagram is called aggregation.
Fundamentals of Database Systems
Chapter Two – Conceptual Database Design E-R modeling

62
E-R diagram of Hospital Management System

MRID
PatID Name HosID Name

Medical Record Has Patient Admitted Hospital

Report Name ISA Has

Indoor Outdoor
Doctor
RoomNo
IPDID OPDID DrID Dr Name
Charge

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

63
Mapping the E-R diagram
to Database Schema
Section - 12
Reduce the E-R diagram to database schema

Step 1: Mapping Entities and Simple Attributes:

 An entity of an ER diagram is turned into a table. PersonID Name

 Each attribute (except multi-valued attribute) turns into


a column (attribute) in the table. Person
 Table name can be same as entity name.
 Key attribute of the entity is the primary key of the Address City
table which is usually underlined.
PhoneNo
 It is highly recommended that every table should start
with its primary key attribute conventionally named as
TablenameID. Person (PersonID, Name, Address, City)

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

65
Reduce the E-R diagram to database schema

Step 2: Mapping Multi-valued Attributes: PersonID PhoneNo

 Multi-value attribute is turned into a new table.


Person
 Add the primary key column into multi-value
attribute’s table.
PhoneNo (PhoneID, PersonID, PhoneNo)
 Add the primary key column of the parent entity’s
table as a foreign key within the new (multi-value
Person (T1)
attribute’s) table. Foreign Key

 Then make a 1:N relationship between the Person


table and PhoneNo table. Having

PhoneNo (T2)

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

66
Reduce the E-R diagram to database schema
WifeID WName
Step 3: Mapping 1:1 Mapping Cardinality:

 Convert both entities in to table with proper attribute. Wife

 Place the primary key of any one table in to the


another table as a foreign key. Having

 Place the primary key of the Wife table WifeID in the


Person
table Persons as Foreign key.
OR
PersonID PName
 Place the primary key of the Person table PersonID in
the table Wife as Foreign key. Person (PersonID, PName)
Wife (WifeID, Wname, PersonID)

Wife (WifeID, Wname)


Person (PersonID, Pname, WifeID)
Fundamentals of Database Systems
Chapter Two – Conceptual Database Design E-R modeling

67
Reduce the E-R diagram to database schema
HouseID HName
Step 4: Mapping 1:N Mapping Cardinality:

 Convert both entities in to table with proper attribute. House

 Place the primary key of table having 1 mapping in to


the another table having many cardinality as a Foreign Having
key.
Person
 Place the primary key of the Person table PersonID in
the table House as Foreign key.
PersonID PName

Person (PersonID, PName)


House (HouseID, Hname, PersonID)

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

68
Reduce the E-R diagram to database schema
ActNo Balance
Step 5: Mapping N:N Mapping Cardinality:

 Convert both entities in to table with proper attribute. Account

 Create a separate table for relationship.


Has_Acct
 Place the primary key of both entities table into the
relationship’s table as foreign key.
Customer
 Place the primary key of the Customer table CID and
Account table Ano in the table Has_Acct as Foreign
CID CName
key.
Customer (CID, CName)
Account (ActNo, Balance)
Has_Acct (HasAcctID, CID, ActNo)

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

69
Summary of Symbols used in E-R diagram

Customer Name Hold


Entity Attribute Relationship

EmpID Age PhoneNo


Primary Key Derived Multi Valued
Attribute Attribute Attribute

Payment PymtID Issue

Weak Entity Discriminating Weak Entity


Attribute Relationship
Role
Name
E R E R ISA

Total Role Specialization/


Participation Indicator Generalization
Fundamentals of Database Systems
Chapter Two – Conceptual Database Design E-R modeling

70
Summary of Symbols used in E-R diagram

Disjoint
E R E ISA ISA
One to One Total Disjoint
Specialization/ Specialization/
E R E Generalization Generalization
One to Many

E R E Overlapping

Many to One ISA ISA


Partial Overlapping
E R E
Specialization/ Specialization/
Many to Many Generalization Generalization

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

71
Questions
1. Write a note on mapping cardinality in E-R diagram.
2. Explain the difference between a weak and a strong entity set.
3. Explain the difference between generalization and specialization. OR Explain specialization
and generalization concept in E-R diagram with suitable example.
4. Write a note on constraints on specialization and generalization.
5. Explain aggregation in E-R diagram with example.
6. What do you mean by integrity constraints? Discuss various integrity constraints.
7. Draw E-R diagram for Bank Management System.
8. Define E-R diagram. Draw an E-R diagram for Library Management System. Assume relevant
entities and attributes for the given system.

Fundamentals of Database Systems


Chapter Two – Conceptual Database Design E-R modeling

72
Group Assignment 10%
1. Construct an E-R diagram for a car-insurance company whose customers own one or more
cars each. Each car has associated with it zero to any number of recorded accidents.
2. Design a generalization–specialization hierarchy for a motor-vehicle sales company. The
company sells motorcycles, passenger cars, vans, and buses. Justify your placement of
attributes at each level of the hierarchy. Explain why they should not be placed at a higher or
lower level.
3. Design a database for an airline. The database must keep track of customers and their
reservations, flights and their status, seat assignments on individual flights, and the schedule
and routing of future flights. Your design should include an E-R diagram, a set of relational
schemas, and a list of constraints, including primary-key and foreign-key constraints.
4. Design a database for a hospital with a set of patients and a set of medical doctors.
Associate with each patient a log of the various tests and examinations conducted. Your
design should include an E-R diagram, a set of relational schemas, and a list of constraints,
including primary-key and foreign-key constraints.
Fundamentals of Database Systems
Chapter Two – Conceptual Database Design E-R modeling

73
Fundamentals of Database Systems (ITEC 2071)

Thank
You

Information Technology

Jimma Institute of Technology

You might also like