I.m having a hard hard time trying to explain why this table violates first norm
ID: 3745304 • Letter: I
Question
I.m having a hard hard time trying to explain why this table violates first normal form (1NF). Need help please, thanks.
Is the LastName attribute a good choice to be the primary key for the CUSTOMER entity? Why or why not.
How is the relationship specified between two entities?
AccountNum CustomerID AccountTyp BalanceAmt1 BalanceAmt2 BalanceAmt3 34109 105 A 2352.47 5123.31 34134 113 A 15.95 34147 422 A 18549.22 100.00 1799.85 34147 422 B 15.33 34155 451 A 3500.00 1.50 170.44 34162 990 X 500000.00 35010 802 X 1908190.12 10.88 37891 999 Z 7.11Explanation / Answer
SOLUTION
i. For a database to be in 1NF it should satisfy two conditions:
- It should not contain non atomic value
- There should not be any repeating groups or attribute
Here in this table second condition is voilated since 'BalanceAmt1','BalanceAmt2' & 'BalanceAmt3' all represent balance.
ii. Primary Key in any table are values which are unique and can be used to extract a particular row.Since two or more customers can have same LastName ,LastName cant be primary key.
iii. Relationship between two entities can be of any form:
- One to One relationship have two seperate unique constraints
- One to Many relationship have one unique constraint
- Many to Many relationship have composite unique constraint