answer2.txt
来自「ssd7考试exam2,绝对有用~欢迎下载」· 文本 代码 · 共 44 行
TXT
44 行
/*
*@author:wangzhesi
* 053597
*/
****1****
List the primary key:
PartID,SupplierID(PK)
****2****
List all the FDs:
PartID,SupplierID -> {PartName,SupplierName}
PartID -> {PartName}
SupplierID -> {SupplierName}
****3****
What normal form is the relation in:
It is belomgs to 1NF.
Firstly the domain of every attribute allows a single atomic value and every cell in the table contains one and only one value.
Secondly, it has partial dependencies on the primary key. So the normal form is the relation in 1NF.
****4****
Apply normalization to it incrementally, carrying the normalization process through each of the higher normal forms possible up to 3NF:
1).Now it is the 1NF, so we first change it to 2NF.
2NF doesn't have partial dependencies on the primary key, so separate it in 3 parts.
CAN_SUPPLY(PartID, SupplierID)
PartID, SupplierID(PK)
PartID, SupplierID -> {PartID, SupplierID}
PART(PartID, PartName)
PartID(PK)
PartID -> {PartName}
Supplier(SupplierID,SupplierName)
SupplierID(PK)
SupplierID -> {SupplierName}
2)Then we change 2NF to 3NF.
From these three tables, we can see that all the tables dosen't contain a non-primary-key attribute that is transitively dependent on the primary key. So the tables are 3NF.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?