1

I have a question on the definition of 3NF given by Chris Date in his book "Database Design and Relational Theory", page 78.

The definition given in the book is: "A relvar R is in 3NF iff for every non-trivial FD X -> Y, either X is a superkey, or Y is a subkey."

(For Date "Y is a subkey" means that Y is contained in a candidate key, and no assumption is made on the cardinality of the set Y in the Date definition.)

It seems to me, however, that this definition is not equivalent to the usual definition (that can be found in other references) saying that "R is in 3NF if for every FD X -> Y, either the FD is trivial, or X is a superkey, or every element in Y\X is contained in a candidate key".

Consider now the relvar with 5 attributes R(A,B,C,D,E) with the following FD cover:

{A,B} -> C,
{C,D} -> E,
E -> B

These imply {A,E} -> {B,C}. The candidate keys of R are K1 = {A,B,D}, K2 = {A,C,D} and K3 = {A,E,D} and so the FD {A,E} -> {B,C} shows that R is not in 3NF if we use Date's definition.

However, it is in 3NF if we use the "usual" definition (since every attribute is actually contained in a candidate key).

Is there something I do not understand? Or is Date really using another (stronger than the usual one) definition of 3NF?

philipxy
  • 14,867
  • 6
  • 39
  • 83
Louis
  • 63
  • 4
  • What edition & printing? I have a 1st edition 1st "release" & the 3NF definition is page 45 (is yours a pdf "page"?) & not quite yours; no redundant "the FD is trivial, or". PS Always look for an errata. There is a [web page](https://www.oreilly.com/catalog/errata.csp?isbn=0636920025276) (confirmed & unconfirmed). But no mention of this. PS It seems much more likely Date would slip or be confused (like re whether certain FDs have only 1 attribute in the RHS) than that they meant to call a condition 3NF that isn't the usual one. PS There are 2 common 3NF definitions, Zaniolo's (here) & Codd's. – philipxy May 02 '22 at 20:56
  • BTW your `R` with those FDs is not in BCNF -- which I guess is going to be the next learning. Go to that via the discussion here re Zaniolo's definition: https://en.wikipedia.org/wiki/Third_normal_form. – AntC May 03 '22 at 06:35
  • I am not a student actually, I already know BCNF but my question was really about 3NF :-). I am using the 2nd (and last) edition of the book, printed in 2019. – Louis May 06 '22 at 08:50
  • Please clarify via edits, not comments. Eg for the edition. – philipxy May 07 '22 at 00:57

1 Answers1

-1

The Date definition says "Y is a subkey means that Y is contained in a key, ...".

The 'usual definition' (where did you get that) says "or every element in Y\X is contained in a key".

Then they both say "Y ... contained in a key".

You can equivalently write {A,E} -> {B,C} as two FDs {A,E} -> {B}; {A,E} -> {C}. Now each Y\X is "contained in a [candidate] key".

So you seem to be quibbling about the wording "every element in Y", which the Date definition isn't explicit about(?) Or perhaps it is, and you haven't quoted Date in full?

AntC
  • 2,623
  • 1
  • 13
  • 20
  • There is no quibbling in math. "for every FD X -> Y" means for every FD. Every, not just some you found that have something to do with one that is a problem. That doesn't make the problem go away. If not every FD makes a condition give the right answer re 3NF then the condition is wrong. (Of course we can wonder how it got wrong & also the argument that there's a wrong answer could be wrong.) – philipxy May 02 '22 at 08:43
  • I have quoted C. Date in full, I think (I purchased the book, I have it here in my hands, I see no assumptions on the set Y). Concerning the 'usual definition' I mentionned, I did not mention the source indeed, sorry. It is the definition given for example by Zaniolo in its 1982 paper ("A New Normal Form for the Design of Relational Database Schemata", accessible freely on the internet), where the author proves that the definition is equivalent to Codd's original definition. – Louis May 06 '22 at 08:46
  • So I really think (unless there is something I do not understand ?) that the two definition are not really the same (even if as you said AntC the difference is small). – Louis May 06 '22 at 08:46