coolchock
coolchock

Reputation: 99

Entity-Relationship Model ternary relationship

I am struggling with that model:enter image description here

Does the given model indicate, that the same project can be worked on at different locations, or a particular project is worked on only at one location?

Thanks in advance!

Upvotes: 1

Views: 330

Answers (1)

Z4-tier
Z4-tier

Reputation: 7988

This is telling us the following:

an employee + a project  ---> a location
an employee + a location ---> a project

if you have:

Joe + Project Zulu ---> Davenport

Then automatically, you get:

Joe + Davenport ---> Project Zulu

This implies that:

Joe + Project Zulu -///-> not davenport
Joe + Davenport -///-> not zulu

You may also have:

Jen + Project Zulu ---> Davenport
Tom + Project Zulu ---> Davenport

which imply:

Jen + Davenport ---> Project Zulu
Tom + Davenport ---> Project Zulu

again, automatically:

Jen + Project Zulu -///-> not Davenport
Tom + Project Zulu -///-> not Davenport
Jen + Davenport -///-> not Project Zulu
Tom + Davenport -///-> not Project Zulu

So for any given employee, a location and a project are essentially the same thing.

There is nothing that ties loca†ion and project outside of the context of an employee. So you could also have this:

Moe + London ---> Project Zulu

which also means:

Moe + Project Zulu ---> London
Moe + Project Zulu -///-> not London
Moe + London -///-> not Project Zulu

so Moe can work on Project Zulu with Joe, Jen and Tom, and from a different location. He may not work on a different project in London, and he can't fly to Davenport and work on Project Zulu there instead.

So your understanding is almost right: a project may be worked on at different locations, but any specific employee may not work on the same project from different locations. Each entity can only be considered in the context of the other two. If you remove one, things break down.

Upvotes: 1

Related Questions