Figuring out the entity relationships  | | |
October 18th, 2003, 02:21 AM
|
#1 (permalink)
| | Ultimate Member
Join Date: Oct 2001 Location: Pasadena, CA
Posts: 2,177
| Figuring out the entity relationships
Well Im trying to figure out the final many:many relationship between the entities I have here. I talked to my teacher and she gave me a real vague clue (I didn't want the answer at all but she basically told me something that I already knew...no help at all). So I have 7 entities and the project says there is 8 total. What Im trying to figure out is which of the two would it be? I have narrowed it down between the room/service entities or the employee/service_performed entities. What Im also wondering is if there can even be a many:many relationship between a normal entity and an event entity (which is what the employee/service_performed relationship is consider s_p is an event)?
Damn logic of this stuff sometimes confuses me. If someone has an idea then that'd be awesome. Thanks a bunch. Maybe give me ideas to head in the right direction...
Tekk
__________________
YAH! I knew you'd be jealous
|
| |
October 18th, 2003, 02:30 AM
|
#2 (permalink)
| | Ultimate Member
Join Date: Oct 2001 Location: Pasadena, CA
Posts: 2,177
|
oops...here's the pic of the diagram  |
| |
October 18th, 2003, 02:32 AM
|
#3 (permalink)
| | Ultimate Member
Join Date: Oct 2001
Posts: 10,821
|
"The Entity"?? I thought maybe Prince had a new name or something.
JP
__________________
"Even a fool is thought to be wise if he is silent"
|
| |
October 18th, 2003, 02:33 AM
|
#4 (permalink)
| | Not Really a Member
Join Date: Oct 2001
Posts: 25,386
|
hmm not sure about a employee/service relationship...
I understand many:many relationships just fine..
Class:students is a many to many
Each student can have many classes, and each class has many students
Can you give some examples on the employee/service?
Hmm maybe a room offers many services, and each service is offered in many rooms?
__________________
Helicopters don't fly; they vibrate so much and make so much noise that the earth rejects them.
|
| |
October 18th, 2003, 02:36 AM
|
#5 (permalink)
| | Ultimate Member
Join Date: Oct 2001 Location: Pasadena, CA
Posts: 2,177
|
Each employee can perform many services, and each service can be performed by many employees.
For example, an employee can have multiple services to do (clean a room, wash the laundry, etc) while each service can be done by many different employees (Jack can clean a room and then later Bob can clean another room). |
| |
October 18th, 2003, 02:40 AM
|
#6 (permalink)
| | Ultimate Member
Join Date: Oct 2001 Location: Pasadena, CA
Posts: 2,177
|
Of course, the project also lists the attributes for each entity and one of the listed attributes for employee is "Employee_Job_Code" which can lead one to believe that each employee really does only have one specific job and no other, which would change the relationship |
| |
October 18th, 2003, 03:26 AM
|
#7 (permalink)
| | Not Really a Member
Join Date: Oct 2001
Posts: 25,386
|
not necessarily
If his job code is 'sanitation engineer' he could perform many services
It depends on the definition of the attribute |
| |
October 18th, 2003, 04:11 AM
|
#8 (permalink)
| | Ultimate Member
Join Date: Oct 2001 Location: Pasadena, CA
Posts: 2,177
|
True...nevermind on that. Makes too much sense that each employee can do multiple jobs. |
| |
October 18th, 2003, 04:59 AM
|
#9 (permalink)
| | Not Really a Member
Join Date: Oct 2001
Posts: 25,386
|
well.. then there are those OTHER employees.. they can take a smoke break.. go to the bathroom.. smoke break.. lunch
there still something you need or confused about? |
| |
October 18th, 2003, 05:10 AM
|
#10 (permalink)
| | Ultimate Member
Join Date: Oct 2001 Location: Pasadena, CA
Posts: 2,177
|
This is what I have so far.....should the Room_Services be changed to an event such as Room_Serviced? Plus whether or not that is an even, Im a little confused on whether the relationships need to be identifying or non-identifying. Would leaving those correlative entities with just 2 keys be ok? (considering we're not supposed to add attributes unless its too an event where we could only add a counter key XXXX_Number) |
| | | Thread Tools | Search this Thread | | | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |