0

Hi all,

I need some help with defining a recursive relationship in a ER diagram. It is a part of my assignment and the below is quoted in the case study.

Admin staffs are in-charge admitting inpatient to the hospital.
Several nurses work in each ward and one of them is in charge of the ward.

I have created entities with attributes as below but I'm not sure if it is correct

NURSE (Nurse_ID, Nurse_In_Charge)
WARD (Ward ID, Ward_Name, Main_Treatment, Nurse_In_Charge, Number_Of_Bed)

I have also attached the ER diagram for the recursive relationship with this post, please have a look and comment.

Thank you.

Attachments recursive_relationship.jpg 20.78 KB
2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by debasisdas
0

Remove Nurse_In_Charge from WARD and maintain a separate table for day to day activty of the ward.

There you can maintain ward ward_id, nurse_id, date_of_activity etc.

0

Thank you debasisdas. So my entities will look like this;

NURSE (Nurse_ID, Nurse_In_Charge)
WARD (Ward ID, Ward_Name, Main_Treatment, Number_Of_Bed)

Should I have Nurse_In_Charge in the NURSE entity? I thought of removing it and replacing it with Department.

Is my ER diagram for the recursive relationship correct?

Remove Nurse_In_Charge from WARD and maintain a separate table for day to day activty of the ward.

There you can maintain ward ward_id, nurse_id, date_of_activity etc.

0

What you plan to store in Nurse_In_Charge, because you already have a Nurse_ID column.

I would suggest make that a flag (store 0 or 1) depending up on if the particular person can be In charge or not.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.