Home  >  Article  >  Database  >  Transitive dependencies in DBMS

Transitive dependencies in DBMS

WBOY
WBOYforward
2023-09-07 12:05:051074browse

DBMS 中的传递依赖

What is transitive dependency

When an indirect relationship leads to functional dependency, it is called transitive dependency.

If P -> Q and Q -> R are true, then P-> R is a transitive dependency.

To achieve 3NF, eliminate transitive dependencies.

Example

##M08M03M05The above table is not in 3NF because it has transitive functional dependencies -
##Movie_ID

td>
Listing_ID

Listing_Type

DVD_Price ( $)

##L09

>

Crime

180

>

M03

L05

Drama

250

L09

Crime

##180

Movie_ID -> Listing_ID Listing_ID -> Listing_Type##Therefore, the following Has transitive functional dependence.

Movie_ID -> Listing_Type

To remove the violation, you need to split the tables and remove the transitive functional dependency.

Movie_ID

180##M05L09Listing_ID
##DVD_Price ($)

M08

L09

##M03 L05

250

180

##

Listing_Type

##L09CrimeDramaNow the above relation is in Third Normal Form (3NF) of Normalization.

L05

##L09 Crime

The above is the detailed content of Transitive dependencies in DBMS. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete