1

Im not sure about the correct definitions for normalisations, as primary key and candidate key are used interchangeably. I have come across these 2 definitions when trying to find a definition for 2NF and 3NF.

Definitions 1:

2NF: "And every non-prime attribute of the table is either dependent on the whole of a candidate key, or on another non-prime attribute."

3NF: "No candidate key transitively determines any non-prime attribute."

Definitions 2:

2NF: "No non-key attributes should functionally depend on part of the primary key"

3NF : "There is no transitive dependancy of a non-key attribute on the primary key"

I am unsure as there is sometimes multiple keys in a relations.

So my question is: say I have been given a database with multiple candidate keys , do I look at the functional dependancies between ALL the candidate keys and non prime attributes or ONLY the primary key that we have chosen?

philipxy
  • 14,867
  • 6
  • 39
  • 83
MohG
  • 25
  • 5
  • Does this answer your question? [Normal forms - 2nd vs 3rd - is the difference just composite keys? non trivial dependency?](https://stackoverflow.com/questions/27474203/normal-forms-2nd-vs-3rd-is-the-difference-just-composite-keys-non-trivial-d) – philipxy Apr 22 '22 at 13:02
  • Sorry but it doesn't really help, and all the textbooks I have read states one of the 2 definitions I have given. My question is: say I have been given a database with multiple candidate keys , do I look at the functional dependancies between ALL the candidate keys and non prime attributes or ONLY the primary key that we have chosen? Thanks for the reply. – MohG Apr 22 '22 at 13:15
  • Please clarify via edits, not comments. But that comment is not clear. PS PKs are irrelevant. They have no role in relational theory. There's just a tradition from before relational theory to pick one key as PK. The wording in your 1st 2NF/3NF is subtlely wrong. I just said: "If you can't tell that these are wrong ask 1 specific question about 1 of them & quote the definitions from the link." If you want to ask about a claimed definition from somewhere, quote exactly & identify the source. But a source that wasn't a (good) published edited reviewed textbook or paper is a poor one to ask about. – philipxy Apr 22 '22 at 13:20
  • It is very clear from correct definitions that (depending on the wording chosen) they talk about for all CKs or for every CK or for no CKs & they don't talk about PKs. – philipxy Apr 22 '22 at 13:21

0 Answers0