*Multiway Relationships*

The E/R model makes it easy to describe relationships involving more than two entity sets. In practice, ternary (three-way) or higher-degree relationships are infrequent, but they are rarely necessary to reflect the true state of affairs. A multiway relationship in an E/R diagram is represented by lines from the relationship diamond to each of the involved entity sets.**Example :** In the following figure is a relationship Contracts that involves a studio, a star, and a movie. This relationship represents that a studio has contracted with a specific star to act in a specific movie. Generally, the value of an E/R relationship can be thought of as a relationship set of tuples whose elements are the entities participating in the relationship, as we discussed in "Instances of an E/R Diagram".

In this way relationship Contracts can be explained by triples of the form

(studio, star, movie)

In multiway relationships, an arrow pointing to an entity set E means that if we select one entity from each of the other entity sets in the relationship, those entities are related to at most one entity in E. (Note that this rule expresses the notation used for many-one, binary relationships.) In above figure, we have an arrow pointing to entity set Studios, indicating that for a specific star and movie, there is only one studio with which the star has contracted for that movie. However, there are no arrows pointing to entity sets Stars or Movies. A studio may contract with several stars for a movie, and a star may contract with one studio for more than one movie.

### Implications Among Relationship Types

We should be well-informed that a many-one relationship is a special case of a many-many relationship, and a one-one relationship is a special case of a many-one relationship. That is, any useful property of many-many relationships applies to many-one relationships as well, and a useful property of many-one relationships holds for one-one relationships too. For instance, a data structure for representing many-one relationships will work for one-one relationships, though it might not work for many-many relationships.### Tags

- multiway relationship
- tuples
- many-one relationship
- Modifying Views
- View Definitions
- Introduction to Selection of Indexes
- Default Values / Indexes
- Simple Table Declarations
- Deletion / Updates
- Database Modifications
- Grouping / HAVING Clauses
- Full-Relation Operations
- Union, Intersection, and Difference of Queries
- Tuple Variables
- Disambiguating Attributes
- Queries Involving More Than One Relation
- Null Values and Comparisons Involving NULL
- Projection in SQL
- The Database Language SQL
- Additional Constraint Examples
- Extending the Projection Operator
- Grouping
- Extended Operators of Relational Algebra
- Selection on Bags / Product of Bags / Joins of Bags
- Union, Intersection, and Difference of Bags
- Relational Operations on Bags
- Dependent and Independent Operations
- Selection / Cartesian Product
- Set Operations on Relations
- An Algebra of Relational Operations
- Relational Algebra
- Information Integration Via Semistructured Data
- Nested Relations
- The Object-Relational Model
- Representing ODL Relationships
- Representing Other Type Constructors
- Nonatomic Attributes in Classes
- Additional ODL Concepts
- Relationships in ODL / Inverse Relationships
- Reasoning About Multivalued Dependencies
- Definition of Multivalued Dependencies
- Multivalued Dependencies
- Boyce-Codd Normal Form
- Decomposing Relations
- Why the Closure Algorithm Works
- Trivial Functional Dependencies
- Rules About Functional Dependencies
- Superkeys
- Keys of Relations
- Using Null Values to Combine Relations - Comparison of Approaches
- Converting Subclass Structures to Relations
- From E/R Diagrams to Relational Designs
- Relation Instances
- Equivalent Representations of a Relation
- Tuples / Domains
- Weak Entity Set Notation
- Requirements for Weak Entity Sets
- Weak Entity Sets
- Referential Integrity
- Single-Value Constraints
- Simplicity Counts
- Converting Multiway Relationships to Binary
- Roles in Relationships
- Multiplicity of Binary E/R Relationships
- Database System Implementation
- Database Design
- Multimedia Data
- Relational Database Systems