question

sun 1 avatar image
sun 1 asked

ER diagram (for hospital)

This is a part of hospital diagram. Each nurse can be assigned to different wards on different days of the week so a nurse must be supervised by another one who is assigned to the same ward on the same day of the week as the nurse or the nurse may be supervised by different nurses on different days of the week, but both the nurse and the supervisor nurse must be assigned to the same ward on the same day in which the supervision takes place. I thin the entity is ward(WardNO, WardName) , nurse (staffNo,Name, WarsNo) and tell me the degree and participant of relation can anyone please help me..
databasehomework
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Raj More avatar image Raj More commented ·
Can many nurses be supervised by the same supervisor nurse?
0 Likes 0 ·
Raj More avatar image
Raj More answered
It only seems logical to me that many nurses would report to one Supervisor nurse. I would probably start with something like this until more requirements are understood ![alt text][1] [1]: http://img502.imageshack.us/img502/1200/1217201172553amnurses.jpg
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sun 1 avatar image
sun 1 answered
this is the picture. we must make some change into two entity (ward and nurse). so can you please help me.. ![alt text][1] [1]: http://www11.0zz0.com/2011/12/17/16/426917858.jpg
3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Raj More avatar image Raj More commented ·
You should edit your original question and add details there.
0 Likes 0 ·
Raj More avatar image Raj More commented ·
My original answer stands. A nurse is not going to be supervised by the same nurse for every shift. Their shifts are not always going to overlap. Also, you may need history of who was a supervisor nurse 2 weeks ago on a particular day for audit reasons.
0 Likes 0 ·
sun 1 avatar image sun 1 commented ·
Thanks for helping me
0 Likes 0 ·
Alendar avatar image
Alendar answered
Raj is right, you need to add a some sort of event tracking table. Your new diagram has no capability for transactional data or time-tracking. A ward shift table solves it elegantly. Your diagram should not have the self-reference of nurse to their supervisor, because that relationship is indirect or incidental. The nurses are assigned to the ward, and the supervising nurse is assigned to the ward. For any given day, a nurse and supervising nurse can be matched by the fact that they are both related to the same ward-shift instance. What may have happened is your user-base gave you requirements in user language, which often looks at what they see day-to-day. The user does not see the difference between first-level and second-level relationships. By relating supervisors and nurses directly, you'll be creating a maintenance nightmare.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.