Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
studentbelfort
Starting Member
12 Posts |
Posted - 2008-02-01 : 03:50:41
|
Hi guys, I've been thinking about this problem now for some time but somehow I don't know if my "solution" for it is right. I'd like to read your opinion.There is a Capital table with Capital_Nr, Capital_Name, Capital_Population, Country_Nr and Country_Name as attributes.I know the table is chaotic so I brought it to 3NF :Capital table : Capital_Nr, Capital_Name, Capital_Population, Country_Nr(foreign key)Country table : Country_Nr and Country_NameOk so I guess the table should be now in 3NF, but what intrigues me is in what NF the table originally was. I tried then to use Codd's definition of 2NF : "a 1NF table is in 2NF if and only if none of its non-prime attributes are functionally dependent on a part (proper subset) of a candidate key". In my opinion the original candidate keys could only be {Capital_Nr},{Country_Nr} and {Country_Name}, each one of them single, i.e. separate from each other. So, as there is no composite candidate key, I can affirm that the original table was in 2NF. Am I right ?Thanks ! |
|
sunil
Constraint Violating Yak Guru
282 Posts |
|
studentbelfort
Starting Member
12 Posts |
Posted - 2008-02-01 : 04:25:32
|
Thanks for the reply. I understand the example you've just showed me, but there an employee can work in many projects, and one project can have many employees working in it. In my example I don't see the reason why to combine Capital_Nr with Country_Nr, since it's granted that every country can have only one capital, and a capital can only belong to a country, so why not use only Capital_Nr as primary key ? I really can't understand it. |
 |
|
sunil
Constraint Violating Yak Guru
282 Posts |
Posted - 2008-02-01 : 04:35:35
|
You are correct in saying that a country can have only one capital. But, in world I believe South africa is a country which has 3 capitals. So, considering that i got to separating country and capitals. Still, this is my thinking. There are more experienced people on this forum who may better explain it (if I am correct or thinking too much). Hope some one else reads this thread on share his thoughts. |
 |
|
|
|
|
|
|