Hello 888-ga,
Chill Source has some good examples of ternary relationships and
alternative models on their website with easy to understand examples
and lots of ERD, Data Structure & even tree diagrams.
Ternary Relationships
How do I model a ternary relationship in Database Design Studio?
"As a deliberate choice, Database Design Studio does not have a
ternary relationship type. This is because we believe that a ternary
relationship can be better modeled using a Weak Entity as we discuss
below.
As an example consider this scenario:
BOOK---BOOK_LOANS---LIBRARY_BRANCH
|
BORROWER
The relationship book_loans is a ternary relationship between the
three entities, and clearly must be a table, with its primary key made
up of the primary keys from the 3 entities to which it is related.
If you make book_loans a weak entity, with PE [Parent Entity] to WE
[Weak Entity] relationships to all of the three other entities you
will achieve the desired end result of a "ternary" type of
relationship, as shown in the ERD below:
You'll have to go to the website to see the ERD & The Data Structure
Diagram as I can not post them here.
http://www.chillisource.com/dds/tutorial/TutorialTernary_Relationships.htm
In another example they use
Student---attendance---Subject
|
Room
The relationship attendance is a ternary relationship between the
three entities, and clearly must be a table, with its primary key made
up of the primary keys from the 3 entities to which it is related.
If you make attendance a weak entity, with Weak Relationship to all
of the three other entities you will achieve the desired end result of
a "ternary" type of relationship, as shown in the ERD below..."
Go to the website to see the ERD The Data Structure Diagram as I can
not post them here.
http://www.chillisource.com/dds/faq/FAQTernary_Relationships.htm
I hope this answer helps you to better understand ternary
relationships. If you need more information please post Clarification
and I will be happy to provide such.
~wlk115
search terms used:
Ternary Relationship
Entity Relationship
Entity Relationship Models |