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 |
Define BCNF. How does it differ from 3NF? Why is it considered stronger than 3NF?
State the steps involved in query processing. Why is the query optimization needed?
Write a C program to check a number is even or odd.
Short Notes : UML
Create a Sparse Matrix in C.
What is an unrolled linked list?
Write a C program to find minimum among three numbers.