Practical 2
Practical 2
REPRESENTATION OF ER DIAGRAM
1. Patient
Interactive Prompt:
How would you handle a situation where two patients have the same name? What
attributes could you use to ensure uniqueness in the database?
---
2. Employee
Imagine the system must track employee shifts as well. Which attributes or new entities
could you introduce to manage shift schedules?
---
Interactive Scenario:
A doctor is assigned to multiple departments on different days. How would you model
this scenario using the ER diagram?
---
4. Nurse (inherits from Employee)
E-ID: E-ID is a foreign key linking the Nurse to the Employee table through the
Employee ID.
Interactive Prompt:
What additional attributes might you need for nurses, such as certifications or specific
wards they are assigned to?
---
5. Room
Type: Defines the quality of the room (e.g., deluxe, private, general)
Interactive Question:
If you needed to track when a room is cleaned after each patient, where would you add
that information in the ER diagram?
---
Interactive Prompt:
Receptionists often handle multiple tasks such as appointment scheduling and billing.
What additional tables or attributes could you add to model their role?
---
7. Test Report
P-ID (Foreign Key referencing Patient): References the Patient table based on the
Patient ID
Test Type: Type of test performed
Interactive Scenario:
Imagine multiple test results for the same patient. How could you structure your
database to manage this effectively?
---
8. Bill
P-ID (Foreign Key referencing Patient): Links the bill to a specific patient
Interactive Scenario:
Sometimes patients may receive multiple bills (e.g., one for room charges and another
for tests). How would you modify the bill entity to handle this?
---
9. Records
Interactive Thought:
If you needed to add historical data, such as a log of past treatments for each patient,
how would you expand the ER diagram to include this?