
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is Transitive dependency in DBMS?
A functional dependency X->Y is a transitive dependency, if X is not candidate key or super key and Y is a non-key attribute(s).
Example 1
Let a relation be R(A,B,C)
Thus, Key attribute = A and Non-key attribute =B,C.
B->C is a transitive dependency.
Example 2
Let's consider another example, where a relation is R(A,B.C.D)
Thus, Key attributes = A,B and Non-key attributes = C,D.
Then, C->D is a Transitive dependency
AB-> D is not a transitive dependency
C->DB is not a transitive dependency.
Problem
A relation R(ABCDEF) and F: {AB->C, C->A, B->DE, ABD-> F}. Find the transitive dependency.
Solution
AB+=ABCDE => AB is candidate key
C+=CA
B+=BDE
ABD+=ABDFCE =>ABD is not candidate key [since AB is candidate key]
=>key attribute= {A,B} and non-key attributes ={C,D,E}
AB-> C is not a transitive dependency
C->A is not a transitive dependency
B->DE is a transitive dependency [Since, B is not a candidate key/super key and DE is a non-key attribute}.
ABD->F is not a transitive dependency. [Since, ABD is a super key].
Example of Transitive Dependency
Consider the table given below −
Book | Book_Author | Age_of_Author |
---|---|---|
ABC | Hari | 60 |
PQR | Potter | 45 |
The dependencies are as follows −
{Book} -> {Book_Author} {Book_Author} does not -> {Book} {Book_Author} -> {Age_of_Author}
Hence, as per the transitivity, the {Book} -> {Age_of_Author}. Therefore, if one knows the book, then the age of the Author is also known.
- Related Questions & Answers
- What is functional dependency and transitive dependency (DBMS)?
- Transitive dependency in DBMS
- What is Multivalued Dependency (DBMS)?
- What is functional dependency in DBMS?
- What is multivalued dependency in DBMS?
- Partial Dependency in DBMS
- Functional dependency in DBMS
- Multivalued dependency in DBMS
- Join dependency in DBMS
- Fully-functional dependency in DBMS
- Explain join dependency in DBMS
- What is Data Dependency?
- What is dependency injection in PHP?
- What is Decomposition in DBMS?
- What is 4NF in DBMS?