Database Design – How to Interpret Ternary Relationship

database-designdatabase-diagramserd

I have tried to search online on how to interpret these ternary relationships but haven't found any clear answer. Since I don't understand how to interpret it I am having trouble changing it into relations as well. In an example like this:

enter image description here

How exactly would I interpret this? For instance:

The line with an arrow going into Works_in3 from the Employee entity, is that pointing to the Departments entity or the Locations entity? So is it implying that an Employee can only work in one department or is it implying that an employee can only work in one location or does it imply both?

Best Answer

This kind of graphical representation is not one I use, so I may have to guess a bit, specially for the small arrow you can see between employees and works_in. I think you can read it as a 0,1 relation.

You can implement this model over 4 tables, like this : (#PK / ~FK)

employees(#ssn, name, lot)
departments(#did, dname, dudget)
locations(#address, capacity)
works_in(#ssn, ~did, ~address, since)