SEng_Chick96
SEng_Chick96

Reputation: 13

ER Diagram Design Method

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

Answers (3)

reaanb
reaanb

Reputation: 10066

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

Employee belongs to crew ER diagram

Upvotes: 0

Walter Mitty
Walter Mitty

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

Anurag Dadheech
Anurag Dadheech

Reputation: 629

enter image description here

One to many relation of employee and crew as above

Upvotes: 1

Related Questions