I am not sure if this statement is true or false: "A table with a single attribute primary key is automatically in at least second normal form (2NF)."
I think it is TRUE but I cannot justify why.
I am not sure if this statement is true or false: "A table with a single attribute primary key is automatically in at least second normal form (2NF)."
I think it is TRUE but I cannot justify why.
For a table to be in first normal form,an attribute of a table cannot have multiple values
For example ,
id mobile_number age
------------------------------
1 9xxx5xxxxx 25
9xxx6xxxxx
2 8xxxx5xxxx 26
7xxxx5xxxx
This can be normalized to 1NF as follows,
id mobile_number age
------------------------------------
1 9xxx5xxxxx 25
1 9xxx6xxxxx 25
2 8xxxx5xxxx 26
2 7xxxx5xxxx 26
A table is said to be in second normal form if the table is in the first normal form and no non-prime attributes depend on a proper subset of any candidate key
Here candidate key is {id,mobile_number}
Non prime attribute is age
The table is not in 2NF because the non-prime attribute(age) is dependent on proper subset of candidate key(id) alone.
To normalize this to 2NF,we split the table as follows
id mobile_number
------------------------------
1 9xxx5xxxxx
1 9xxx6xxxxx
2 8xxxx5xxxx
2 7xxxx5xxxx
id age
------
1 25
2 26
If relation schema R already is in 1NF and primary key has only one attribute then that relation R at least must be in 2NF.