資料庫表設計三範式

來源:互聯網
上載者:User

資料庫設計三範式(nomorlization)

1NF:原子性,即每個欄位都不可以在分割了。

2NF:唯一性,即每個表只描述一個實體,這個實體要有主鍵,非主關鍵字要完全依賴主鍵,正因為說是完全依賴,是因為在組合主鍵存在的情況下,非主關鍵字不能只依賴部分關鍵字。

3NF:一個表中不能包含其他表中已經存在的非主鍵欄位資訊,也就是說只可以包含其他表的主鍵資訊,這樣就是主外鍵,通過主外鍵就可以進行表之間的串連(join),3NF主要是減少資料冗餘。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.