Draw the ER diagram of a hospital and explain.
ER diagram of Hospital: -
Entity_name |
Entity-type |
Attributes |
Type |
Relationship with other entity |
Relationship type |
Specialization/Generalization |
Patient |
Strong |
Id |
Primary key |
“Billed for” Treatment, Medicine, Equipment
|
Fully dependent on “Billed for” |
|
Name |
Simple |
|||||
Address |
Simple |
|||||
Sex |
Simple |
|||||
Age |
Derived |
|||||
Info |
Multivalued |
|||||
Contact_no |
Multivalued |
|||||
Date_admitted |
Simple |
|||||
Date_discharge |
Simple |
|||||
Treatment |
Weak |
|
|
|
Fully dependent on “Billed for” |
|
Medicine |
Strong |
Code |
Primary key |
|
|
|
Price |
Simple |
|||||
Description |
Simple |
|||||
Equipment |
Weak |
Price |
Simple |
|
|
|
Description |
Discriminator |
|||||
Room |
Strong |
Room_id |
Primary key |
Is “Assigned” for Patient |
|
|
Type |
Simple |
|||||
Extension |
Simple |
|||||
Employee |
Strong |
Id |
Primary key |
|
|
Generalized for Doctor, Nurse, Receptionist |
Name |
Simple |
|||||
Sex |
Simple |
|||||
Salary |
Simple |
|||||
Contact_info |
Multivalued |
|||||
Qualification |
Simple |
|||||
Experience |
Simple |
|||||
Doctor |
Strong |
|
|
“Attends” Patient |
|
Specialized entity of Employee, Generalized for Visiting, Permanent, Trainee |
Visiting |
Strong |
|
|
|
|
Specialized entity of Doctor |
Permanent |
Strong |
|
|
|
|
Specialized entity of Doctor |
Trainee |
Strong |
|
|
|
|
Specialized entity of Doctor |
Nurse |
Strong |
|
|
“Governs” Room |
“Governs” relationship is Fully dependent on “Nurse” |
Specialized entity of Employee |
Receptionist |
Strong |
|
|
“Maintains” Record |
|
Specialized entity of Employee |
Record |
Strong |
Record_no |
Primary key |
|
|
|
Patients_info |
Multivalued |
|||||
Appointment |
Simple |
State the steps involved in query processing. Why is the query optimization needed?
Define a Foreign key. Why is the concept needed? How does it play a role in the join operation?
Define BCNF. How does it differ from 3NF? Why is it considered stronger than 3NF?
Define Quality Planning
Write short notes on the following :
a) BFS
b) Tail recursion
What is Risk? Why Risk Analysis is done?
What is linear searching?