0

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?

halfer
  • 19,824
  • 17
  • 99
  • 186

3 Answers3

1

enter image description here

One to many relation of employee and crew as above

Anurag Dadheech
  • 629
  • 1
  • 5
  • 14
1

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.

Walter Mitty
  • 18,205
  • 2
  • 28
  • 58
  • Hi @Walter Mitty, may you help me out with this ER please? : https://stackoverflow.com/questions/54181058/database-design-for-a-multiplayer-single-quiz-game I'm stuck – Skizo-ozᴉʞS ツ Jan 15 '19 at 10:52
0

What you're describing sounds like a relationship between two entity sets. I would diagram it like so:

Employee belongs to crew ER diagram

reaanb
  • 9,806
  • 2
  • 23
  • 37