什么是傳遞依賴
當間接關系導致函數依賴時,稱為傳遞依賴。
如果 P -> Q 和 Q -> R 為真,那么 P-> R 是傳遞依賴。
要實現 3NF,消除傳遞依賴。
示例
| Movie_ID td> | Listing_ID | Listing_Type | DVD_Price ($) | |
| M08 | L09 > | 犯罪 | 180 > | |
| M03 | M03 | L05 | 戲劇 | 250 |
| M05 | L09 | 犯罪 | 180 |
上表不在3NF,因為它具有傳遞函數依賴 –
| Movie_ID -> Listing_ID
Listing_ID -> Listing_Type |
因此,以下具有傳遞函數依賴性。
Movie_ID -> Listing_Type
The above states the relation violates the 3rd Normal Form (3NF).
To remove the violation, you need to split the tables and remove the transitive functional dependency.
Movie_ID
| Listing_ID | DVD_Price ($) | |
| M08 | L09 | 180 |
| M03 | L05 | 250 |
| M05 | L09 | 180 |
Listing_ID
| Listing_Type | |
| L09 | Crime |
| L05 | Drama |
| L09 | Crime |
Now the above relation is in Third Normal Form (3NF) of Normalization.
以上就是DBMS 中的傳遞依賴的詳細內容,更多請關注www.92cms.cn其它相關文章!






