Reputation: 13
I have an entity: Employee. This is at the top of my ER diagram (rectangle box)
I have another entity: Crew. This is the second object on my ER diagram (rectangle box). It is under the above rectangle.
I have a composite entity, containing foreign keys made up of primary key Employee_ID and Crew_ID
Because the composite entity contains foreign keys from the employee and crew table, does that mean I have to draw a line in my ER diagram from the composite entity to the TWO rectangles, or just the one above it?
Upvotes: 0
Views: 450
Reputation: 10066
What you're describing sounds like a relationship between two entity sets. I would diagram it like so:
Upvotes: 0
Reputation: 18940
Many people would diagram this case with just two boxes, Employee and crew. Then put crow's feet at both ends of the connector.
Many other people would diagram this case with two boxes and a diamond in between. A diamond represents a relationship, and your entity with two foreign keys is precisely that. Most people would come up with a name that is less generic than "Entity". Perhaps something like "belongs to".
All of this is for an ER diagram of an ER model. If you're trying to diagram a relational model, that's a different story.
Upvotes: 1