SlideShare a Scribd company logo
1 of 15
ER Modeling Case Studies
2
BanksDatabase :ER Case Study
 Consider the following set of requirements for a Bank database that is
used to keep track of Customer.
a) Each bank has a unique name.
b) Each branch has a number, name, address (number, street, city), and set of
phones.
c) Customer includes their name, set of address (P.O. Box, city, zip code,
country), set of phones, and social security number.
d) Accounts have numbers, types (e.g. saving, checking) and balance. Other
branches might use the same designation for accounts. So to name an
account uniquely, we need to give both the branch number to which this
account belongs to and the account number.
e) Not all bank customers must own accounts and a customer may have at
most 5 accounts in the bank.
f) An account must have only one customer.
g) A customer may have many accounts in different branches.
3
Banks Database :ER Case Study
 Design an ER schema for this application, and draw an
ER diagram for that schema.
 Specify key attributes of each entity type and
structural constraints on each relationship type.
 Note any unspecified requirements, and make
appropriate assumptions to make the specification
complete.
4
Banks Database :ER Case Study
0..*
Bank
Name {PK}
Branch
Branch_NO{PK}
Name
Address
Number
Street
City
Phone[1..*]
 has
Owns 
 Contains
1..1
0..*
1..1
0..*
0..5
Customer
SSN {PK}
Name
Address [1..*]
P.O Box
Code
City
Country
Phone [1..*]
Account
Type
Balance
Account NO
1..1
Reason of chasm trap :
Note all customer should
have an account .So we
can not answer this
question :
List all customer
available on a specific
branch?
5
Banks Database :ER Case Study
0..*
 has
0..*
1..*
Bank
Name {PK}
Branch
Branch_NO{PK}
Name
Address
Number
Street
City
Phone[1..*]
 has
Owns 
 Contains
1..1
0..*
1..1
0..*
0..5
Customer
SSN {PK}
Name
Address [1..*]
P.O Box
Code
City
Country
Phone [1..*]
Account
Type
Balance
Account NO
1..1
To avoid chasm trap we
add this relationship
6
Organization :ER Case Study
 Organization made up of various departments, each having a name,
identifying no., and an employee who is the manager. A department
may be located in different places. Information about employee
includes name, identification number, birth date, address, sex, and
salary. Each employee is assigned to one department. The date the
manager is appointed to a department is also tracked. Employees may
be directly supervised by another employee. Each project within the
organization is controlled by a department. Employees (not necessarily
from the controlling dept.) are assigned to projects. Information about
projects includes project name, no., and location. Hours spent by
employees on each project are also kept.
7
Organization :ER Case Study
 draw an ER diagram to represent the data requirements as
following:
– Identify the main entity types.
– Identify the main relationship types between the entity types.
– Identify attributes and associate them with entity or relationship
types.
– Determine candidate and primary key attributes for each (strong)
entity type.
– Determine the multiplicity constraints for each relationship .State
any assumptions necessary to support your design.
8
Organization :ER Case Study
0..*
1..* 1..1
Works on 
 Controls
0..1
Employee
1..1
1..1
1..*
Project
Pro_NO{PK}
Name
Location
1..*
Department
Dep_NO{PK}
Name
Location[1..*]
Total_of_employee
Employee
NO{PK}
Name
Birthdate
Sex
Salary
Manages 
assigns to 
Manager
supervises 
Supervisor
Supervisee
1..*
0..1
Start Date
Hours
Worker
9
Hospital :ER Case Study
 A General Hospital consists of a number of specialized wards (such
as Radiology, Oncology, etc) .Information about ward includes unique
name, total numbers of current patients. Each ward hosts a number of
patients, who were admitted by a consultant (doctors) employed by the
Hospital. On admission, the date and time are kept. The personal
details of every patient includes name, Medical Recode Number
(MRN), set of phone and one address (city, street, code). A separate
register is to be held to store the information of the tests undertaken.
Each test has unique episode No. , category and the final result of test.
Number of tests may be conducted for each patient. Doctors are
specialists in a specific ward and may be leading consultants for a
number of patients. Each patient is assigned to one leading consultant
but may be examined by other doctors, if required.
10
Hospital :ER Case Study
 draw an ER diagram to represent the data requirements as
following:
– Identify the main entity types.
– Identify the main relationship types between the entity types.
– Identify attributes and associate them with entity or relationship
types.
– Determine candidate and primary key attributes for each (strong)
entity type.
– Determine the multiplicity constraints for each relationship .State
any assumptions necessary to support your design.
11
Hospital :ER Case Study
0..*
0..*
1..1
 consults
 Exams
0..*
Consultant
1..1
0..*
0..*
0..*
 Specializes in
Leader
conducts 
1..1
0..*
Examiner
Test
Ep _NO{PK}
Category
Result
Date
Time
Ward
Name {PK}
Total_of_pat
Doctor
Doc_NO{PK}
Patient
MRN{PK}
Name
Phone [1..*]
Address
Code
Street
City
0..*
Admits
12
Department :ER Case Study
 Identify the entities and relationships for the following description
and draw an ER diagram.
Departments, identified by ID, operate a variety of printers, each
located in a particular room in a particular building. Printers are
supplied by a number of suppliers, identified by name, with each
supplier charging a different price for a given printer, but also
providing different delivery delays, measured in days. A given room
can have any number of printers, including none.
13
Department :ER Case Study
14
Journal :ER Case Study
 Identify the entities and relationships for the following description
and draw an ER diagram.
Persons, described by their name, SSN, and address, subscribe to
various journals. Each journal, identified by a title and an ISBN, has a
set of numbered volumes and each of these has a set of numbered
issues. Subscribers have an initial subscription date and a termination
date for each journal to which they subscribe.
15
Journal :ER Case Study

More Related Content

Similar to er_modeling_case_studies.ppt

A small medical clinic needs a relational database for its medical pra (1).pdf
A small medical clinic needs a relational database for its medical pra (1).pdfA small medical clinic needs a relational database for its medical pra (1).pdf
A small medical clinic needs a relational database for its medical pra (1).pdffprancky
 
Coit11237 assignment 2 specifications
Coit11237 assignment 2 specificationsCoit11237 assignment 2 specifications
Coit11237 assignment 2 specificationsNicole Valerio
 
er diagram case study.pdf
er diagram case study.pdfer diagram case study.pdf
er diagram case study.pdfSabitraGyawali1
 
databases3b
databases3bdatabases3b
databases3bc.west
 
Criterion Feedback2 Mar Answers and essay were sloppy with no a
Criterion Feedback2 Mar Answers and essay were sloppy with no aCriterion Feedback2 Mar Answers and essay were sloppy with no a
Criterion Feedback2 Mar Answers and essay were sloppy with no aMargenePurnell14
 
databases2
databases2databases2
databases2c.west
 
Beit 381 se lec 19 - 18 - 12 apr24 - eraa and data modeling
Beit 381 se lec 19 - 18 - 12 apr24 - eraa and data modelingBeit 381 se lec 19 - 18 - 12 apr24 - eraa and data modeling
Beit 381 se lec 19 - 18 - 12 apr24 - eraa and data modelingbabak danyal
 
Case StudyIn March 1994, Randal Schwartz was indicted on three f.docx
Case StudyIn March 1994, Randal Schwartz was indicted on three f.docxCase StudyIn March 1994, Randal Schwartz was indicted on three f.docx
Case StudyIn March 1994, Randal Schwartz was indicted on three f.docxwendolynhalbert
 
InstructionsA data model provides a view of how the data is .docx
InstructionsA data model provides a view of how the data is .docxInstructionsA data model provides a view of how the data is .docx
InstructionsA data model provides a view of how the data is .docxmaoanderton
 
Assignment Select a company for which you have a working knowledg.docx
Assignment Select a company for which you have a working knowledg.docxAssignment Select a company for which you have a working knowledg.docx
Assignment Select a company for which you have a working knowledg.docxssuser562afc1
 
7Crisis Response PortfolioYour NameWalden Univer.docx
7Crisis Response PortfolioYour NameWalden Univer.docx7Crisis Response PortfolioYour NameWalden Univer.docx
7Crisis Response PortfolioYour NameWalden Univer.docxsleeperharwell
 
answer the questions.docx
answer the questions.docxanswer the questions.docx
answer the questions.docxwrite30
 
answer the questions.docx
answer the questions.docxanswer the questions.docx
answer the questions.docxwrite22
 
Best structure of taxonomies for the different purposes of analysis
Best structure of taxonomies for the different purposes of analysisBest structure of taxonomies for the different purposes of analysis
Best structure of taxonomies for the different purposes of analysisChie Mitsui
 
Project Plans Each student will submit two project plan.docx
Project Plans  Each student will submit two project plan.docxProject Plans  Each student will submit two project plan.docx
Project Plans Each student will submit two project plan.docxwkyra78
 

Similar to er_modeling_case_studies.ppt (20)

ERD.pdf
ERD.pdfERD.pdf
ERD.pdf
 
A small medical clinic needs a relational database for its medical pra (1).pdf
A small medical clinic needs a relational database for its medical pra (1).pdfA small medical clinic needs a relational database for its medical pra (1).pdf
A small medical clinic needs a relational database for its medical pra (1).pdf
 
ER modeling
ER modelingER modeling
ER modeling
 
Coit11237 assignment 2 specifications
Coit11237 assignment 2 specificationsCoit11237 assignment 2 specifications
Coit11237 assignment 2 specifications
 
er diagram case study.pdf
er diagram case study.pdfer diagram case study.pdf
er diagram case study.pdf
 
Assignment#03
Assignment#03Assignment#03
Assignment#03
 
EDA-Unit 1.pdf
EDA-Unit 1.pdfEDA-Unit 1.pdf
EDA-Unit 1.pdf
 
databases3b
databases3bdatabases3b
databases3b
 
Criterion Feedback2 Mar Answers and essay were sloppy with no a
Criterion Feedback2 Mar Answers and essay were sloppy with no aCriterion Feedback2 Mar Answers and essay were sloppy with no a
Criterion Feedback2 Mar Answers and essay were sloppy with no a
 
databases2
databases2databases2
databases2
 
Sq lite module4
Sq lite module4Sq lite module4
Sq lite module4
 
Beit 381 se lec 19 - 18 - 12 apr24 - eraa and data modeling
Beit 381 se lec 19 - 18 - 12 apr24 - eraa and data modelingBeit 381 se lec 19 - 18 - 12 apr24 - eraa and data modeling
Beit 381 se lec 19 - 18 - 12 apr24 - eraa and data modeling
 
Case StudyIn March 1994, Randal Schwartz was indicted on three f.docx
Case StudyIn March 1994, Randal Schwartz was indicted on three f.docxCase StudyIn March 1994, Randal Schwartz was indicted on three f.docx
Case StudyIn March 1994, Randal Schwartz was indicted on three f.docx
 
InstructionsA data model provides a view of how the data is .docx
InstructionsA data model provides a view of how the data is .docxInstructionsA data model provides a view of how the data is .docx
InstructionsA data model provides a view of how the data is .docx
 
Assignment Select a company for which you have a working knowledg.docx
Assignment Select a company for which you have a working knowledg.docxAssignment Select a company for which you have a working knowledg.docx
Assignment Select a company for which you have a working knowledg.docx
 
7Crisis Response PortfolioYour NameWalden Univer.docx
7Crisis Response PortfolioYour NameWalden Univer.docx7Crisis Response PortfolioYour NameWalden Univer.docx
7Crisis Response PortfolioYour NameWalden Univer.docx
 
answer the questions.docx
answer the questions.docxanswer the questions.docx
answer the questions.docx
 
answer the questions.docx
answer the questions.docxanswer the questions.docx
answer the questions.docx
 
Best structure of taxonomies for the different purposes of analysis
Best structure of taxonomies for the different purposes of analysisBest structure of taxonomies for the different purposes of analysis
Best structure of taxonomies for the different purposes of analysis
 
Project Plans Each student will submit two project plan.docx
Project Plans  Each student will submit two project plan.docxProject Plans  Each student will submit two project plan.docx
Project Plans Each student will submit two project plan.docx
 

Recently uploaded

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 

Recently uploaded (20)

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 

er_modeling_case_studies.ppt

  • 2. 2 BanksDatabase :ER Case Study  Consider the following set of requirements for a Bank database that is used to keep track of Customer. a) Each bank has a unique name. b) Each branch has a number, name, address (number, street, city), and set of phones. c) Customer includes their name, set of address (P.O. Box, city, zip code, country), set of phones, and social security number. d) Accounts have numbers, types (e.g. saving, checking) and balance. Other branches might use the same designation for accounts. So to name an account uniquely, we need to give both the branch number to which this account belongs to and the account number. e) Not all bank customers must own accounts and a customer may have at most 5 accounts in the bank. f) An account must have only one customer. g) A customer may have many accounts in different branches.
  • 3. 3 Banks Database :ER Case Study  Design an ER schema for this application, and draw an ER diagram for that schema.  Specify key attributes of each entity type and structural constraints on each relationship type.  Note any unspecified requirements, and make appropriate assumptions to make the specification complete.
  • 4. 4 Banks Database :ER Case Study 0..* Bank Name {PK} Branch Branch_NO{PK} Name Address Number Street City Phone[1..*]  has Owns   Contains 1..1 0..* 1..1 0..* 0..5 Customer SSN {PK} Name Address [1..*] P.O Box Code City Country Phone [1..*] Account Type Balance Account NO 1..1 Reason of chasm trap : Note all customer should have an account .So we can not answer this question : List all customer available on a specific branch?
  • 5. 5 Banks Database :ER Case Study 0..*  has 0..* 1..* Bank Name {PK} Branch Branch_NO{PK} Name Address Number Street City Phone[1..*]  has Owns   Contains 1..1 0..* 1..1 0..* 0..5 Customer SSN {PK} Name Address [1..*] P.O Box Code City Country Phone [1..*] Account Type Balance Account NO 1..1 To avoid chasm trap we add this relationship
  • 6. 6 Organization :ER Case Study  Organization made up of various departments, each having a name, identifying no., and an employee who is the manager. A department may be located in different places. Information about employee includes name, identification number, birth date, address, sex, and salary. Each employee is assigned to one department. The date the manager is appointed to a department is also tracked. Employees may be directly supervised by another employee. Each project within the organization is controlled by a department. Employees (not necessarily from the controlling dept.) are assigned to projects. Information about projects includes project name, no., and location. Hours spent by employees on each project are also kept.
  • 7. 7 Organization :ER Case Study  draw an ER diagram to represent the data requirements as following: – Identify the main entity types. – Identify the main relationship types between the entity types. – Identify attributes and associate them with entity or relationship types. – Determine candidate and primary key attributes for each (strong) entity type. – Determine the multiplicity constraints for each relationship .State any assumptions necessary to support your design.
  • 8. 8 Organization :ER Case Study 0..* 1..* 1..1 Works on   Controls 0..1 Employee 1..1 1..1 1..* Project Pro_NO{PK} Name Location 1..* Department Dep_NO{PK} Name Location[1..*] Total_of_employee Employee NO{PK} Name Birthdate Sex Salary Manages  assigns to  Manager supervises  Supervisor Supervisee 1..* 0..1 Start Date Hours Worker
  • 9. 9 Hospital :ER Case Study  A General Hospital consists of a number of specialized wards (such as Radiology, Oncology, etc) .Information about ward includes unique name, total numbers of current patients. Each ward hosts a number of patients, who were admitted by a consultant (doctors) employed by the Hospital. On admission, the date and time are kept. The personal details of every patient includes name, Medical Recode Number (MRN), set of phone and one address (city, street, code). A separate register is to be held to store the information of the tests undertaken. Each test has unique episode No. , category and the final result of test. Number of tests may be conducted for each patient. Doctors are specialists in a specific ward and may be leading consultants for a number of patients. Each patient is assigned to one leading consultant but may be examined by other doctors, if required.
  • 10. 10 Hospital :ER Case Study  draw an ER diagram to represent the data requirements as following: – Identify the main entity types. – Identify the main relationship types between the entity types. – Identify attributes and associate them with entity or relationship types. – Determine candidate and primary key attributes for each (strong) entity type. – Determine the multiplicity constraints for each relationship .State any assumptions necessary to support your design.
  • 11. 11 Hospital :ER Case Study 0..* 0..* 1..1  consults  Exams 0..* Consultant 1..1 0..* 0..* 0..*  Specializes in Leader conducts  1..1 0..* Examiner Test Ep _NO{PK} Category Result Date Time Ward Name {PK} Total_of_pat Doctor Doc_NO{PK} Patient MRN{PK} Name Phone [1..*] Address Code Street City 0..* Admits
  • 12. 12 Department :ER Case Study  Identify the entities and relationships for the following description and draw an ER diagram. Departments, identified by ID, operate a variety of printers, each located in a particular room in a particular building. Printers are supplied by a number of suppliers, identified by name, with each supplier charging a different price for a given printer, but also providing different delivery delays, measured in days. A given room can have any number of printers, including none.
  • 14. 14 Journal :ER Case Study  Identify the entities and relationships for the following description and draw an ER diagram. Persons, described by their name, SSN, and address, subscribe to various journals. Each journal, identified by a title and an ISBN, has a set of numbered volumes and each of these has a set of numbered issues. Subscribers have an initial subscription date and a termination date for each journal to which they subscribe.