*The Transitive Rule*

The transitive rule lets us cascade two FD's.

● If A_{1}A_{2} . . . A_{n} → B_{1}B_{2} . . . B_{m} and B_{1}B_{2} . . . B_{m} → C_{1}C_{2} . . . C_{k} hold in relation R, then A_{1}A_{2} . . . A_{n} → C_{1}C_{2} . . . C_{k} also holds in R.

If some of the C's are among the A's, we may remove them from the right side by the trivial-dependencies rule.

To see why the transitive rule holds, apply the test of "Computing the Closure of Attributes". To test whether A_{1}A_{2} . . . A_{n} → C_{1}C_{2} . . . C_{k} holds, we need to compute the closure {A_{1}, A_{2}, . . . ,A_{n}}^{+} with respect to the two given FD's.

The FD A_{1}A_{2} . . . A_{n} → B_{1}B_{2} . . . B_{m} tells us that all of B_{1}, B_{2}, . . . ,B_{m} are in {A_{1}, A_{2}, . . . ,A_{n}}^{+}. Then, we can use the FD B_{1}B_{2} . . . B_{m} → C_{1}C_{2} . . . C_{k} to add C_{1}, C_{2}, . . . ,C_{k} to {A_{1}, A_{2} , . . . , A_{n}}^{+}. Since all the C's are in

{A_{1}, A_{2}, . . . ,A_{n}}^{+}

we conclude that A_{1}A_{2} . . . A_{n} → C_{1}C_{2} . . . Ck holds for any relation that satisfies both A_{1}A_{2} . . . A_{n} → B_{1}B_{2} . . . B_{m} and B_{1}B_{2} . . . B_{m} → C_{1}C_{2} . . . C_{k}.

**Example :**Let us begin with the relation Movies of Figure (a) of "Combining Relations" that was constructed in Example (a) (of the same article) to represent the four attributes of entity set Movies, plus its relationship Owns with Studios. The relation and some sample data is

Suppose we decided to represent some data about the owning studio in this same relation. For simplicity, we shall add only a city for the studio, representing its address. The relation might then look like

Two of the FD's that we might sensibly claim to hold are:

**title year studioName**

studioName

studioName

**studioAddr**

The first is justified because the Owns relationship is many-one. The second is justified because the address is an attribute of Studios, and the name of the studio is the key of Studios.

The transitive rule allows us to combine the two FD's above to get a new FD:

**title year**

**studioAddr**

This FD says that a title and year (i.e., a movie) determines an address - the address of the studio owning the movie.

### Tags

- relationship
- attributes
- entity set
- Instead-Of Triggers
- Schema-Level Constraints and Triggers
- Tuple-Based CHECK Constraints
- Constraints on Attributes and Tuples
- Declaring Foreign-Key Constraints
- Keys Declared With UNIQUE
- Constraints and Triggers
- Modifying Views
- View Definitions
- Introduction to Selection of Indexes
- Default Values / Indexes
- Simple Table Declarations
- Defining a Relation Schema in SQL
- Deletion / Updates
- Database Modifications
- Grouping / HAVING Clauses
- Full-Relation Operations
- Natural Joins / Outerjoins
- Subqueries in FROM Clauses
- Conditions Involving Tuples
- Subqueries
- Union, Intersection, and Difference of Queries
- Interpreting Multirelation Queries
- Disambiguating Attributes
- Queries Involving More Than One Relation
- Null Values and Comparisons Involving NULL
- Selection in SQL
- Projection in SQL
- Additional Constraint Examples
- Extending the Projection Operator
- Extended Operators of Relational Algebra
- Union, Intersection, and Difference of Bags
- Relational Operations on Bags
- A Linear Notation for Algebraic Expressions
- Dependent and Independent Operations
- Renaming
- Combining Operations to Form Queries
- Selection / Cartesian Product
- Set Operations on Relations
- An Algebra of Relational Operations
- Relational Algebra
- Attribute Lists
- Semistructured Data Representation
- Semistructured Data
- Object-Oriented Versus Object-Relational
- Nested Relations
- What If There Is No Key
- Representing ODL Relationships
- Representing Other Type Constructors
- Representing Set-Valued Attributes
- Nonatomic Attributes in Classes
- Declaring Keys in ODL
- Extents
- Subclasses in ODL / Multiple Inheritance in ODL
- Types in ODL
- Methods in ODL
- Multiplicity of Relationships
- Relationships in ODL / Inverse Relationships
- Attributes in ODL
- Introduction to ODL
- The Type System
- Decomposition into Fourth Normal Form
- Reasoning About Multivalued Dependencies
- Definition of Multivalued Dependencies
- Multivalued Dependencies
- Third Normal Form
- Boyce-Codd Normal Form
- Projecting Functional Dependencies
- Closing Sets of Functional Dependencies
- Why the Closure Algorithm Works
- Computing the Closure of Attributes
- Trivial Functional Dependencies
- The Splitting/Combining Rule
- Rules About Functional Dependencies
- Keys of Relations
- Functional Dependencies
- Using Null Values to Combine Relations - Comparison of Approaches
- An Object-Oriented Approach
- Converting Subclass Structures to Relations
- Handling Weak Entity Sets
- Combining Relations
- From E/R Relationships to Relations
- From Entity Sets to Relations
- Relation Instances
- Equivalent Representations of a Relation
- Tuples / Domains
- Attributes / Schemas
- The Relational Data Model
- Summary of The Entity-Relationship Data Model
- Weak Entity Set Notation
- Requirements for Weak Entity Sets
- Weak Entity Sets
- Other Kinds of Constraints
- Referential Integrity in E/R Diagrams
- Referential Integrity
- Single-Value Constraints
- Representing Keys in the E/R Model
- Keys in the E/R Model
- The Modeling of Constraints
- Picking the Right Kind of Element
- Choosing the Right Relationships
- Simplicity Counts
- Avoiding Redundancy
- Design Principles
- Subclasses in the E/R Model
- Converting Multiway Relationships to Binary
- Attributes on Relationships
- Roles in Relationships
- Multiplicity of Binary E/R Relationships
- Instances of an E/R Diagram
- Elements of the E/R Model
- Relational Database Systems