AdSense

網頁

2018/7/4

Compound Key和Composite Key的差別

資料表的主鍵(Primary Key)如果是由多個欄位(屬性)組成,則稱為複合主鍵(Compound Key)。

但複合主鍵英文有兩種,分別是Composite Key與Compound Key,兩者差別在於Composite Key是由多個欄位所組成的主鍵,而Compound Key的組成欄位包含了外鍵(Foreign Key),所以Composite Key的定義比較廣,而Compound Key是在Composite Key的定義下又特別說明是包含外鍵的情況。


參考:

沒有留言:

AdSense