SQL Strategy - A site to master SQL while executing it on the Web
Home >> Normalization strategy - Let's solve past question.

Let's solve past question.

Try the following three steps. It is easier to understand if you prepare a piece of paper and normalize the items as you write them down.

Step1.Divide repetitive items into separate appendices.
Step2.Split the items that are subordinate to a partial function into separate appendices.
Step3.Make a separate table of transitive function dependencies. (If none, complete Step 2)
Beginner System Administrator AM Q43, Autumn 2000
Which structure normalizes the following order Table?

Order NoOrder DateRecipientgoodsquantityunit pricetotal amount
100/10/01AS
T
3
2
1,000
950
4,900
200/10/01BS
U
V
1
10
5
1,000
1,200
1,800
22,000
300/10/02BT89507,600
400/10/02CU251,20030,000

A
Order NoOrder DateRecipienttotal amount
Order Nogoodsquantity
goodsunit price

B
Order NoOrder DateRecipienttotal amount
Recipientgoodsquantity
goodsunit price

C
Order NoOrder DateRecipienttotal amount
Order Dategoodsquantity
goodsunit price

D
Order NoOrder DateRecipienttotal amount
goodsquantity
goodsunit price
Answer
A
Order NoOrder DateRecipienttotal amount
Order Nogoodsquantity
goodsunit price
Explanation

Step1 Eliminate repetitive groups.。

The repeating groups are GOODS, QUANTITY, UNIT PRICE, and so on. Let's split them into separate tables. To avoid losing relationships when doing so, we will split them together with their dependent keys.
Order NoOrder DateRecipienttotal amount

Order Nogoodsquantityunit price

Step2 Split the item to which the partial function is subordinated into a separate Table.

The unit price of GOODS is functionally dependent on GOODS, right? So let's split it.
Order NoOrder DateRecipienttotal amount

Order Nogoodsquantity

goodsunit price

Step3 Split transitive functional dependencies.

There is no transitive function dependence here, so we are done.