Guys, how would you create second form of this table (primary key is: {isbn,copy}):
isbn AB-1234-X
authorID IC45
authorName I.Conn
title The final curtain
copy 2
classification Detectivefiction
userID xyz44
Guys, how would you create second form of this table (primary key is: {isbn,copy}):
Share
A relation is in 2NF iff
dependent on the whole of every
candidate key (not on just part of
any candidate key)
The only candidate key is {isbn, copy}. So the question becomes three questions.
{authorID, authorName, title,
classification, userID} dependent only
on {isbn}?
{authorID, authorName, title,
classification, userID} dependent only
on {copy}?
What do you think?
Later . . .
Yes. In “relational speak”, you replaced the original relation R with these two projections.
userid}
authorname, title, classification}
If you’ve done that correctly, you should be able to create R again by joining R1 and R2 on {isbn}.
Now both R1 and R2 are in 2NF. (I think that was the point of the homework question.) You might want to consider whether R1 and R2 are in
Still later . . .
Speaking informally, a relation is in 3NF iff
When I say “it’s in 2NF”, I mean the relation in question is in 2NF and it’s not already in 3NF, BCNF, 4NF, or 5NF.
What normal form are R1 and R2 in? You’ll want to explain your reasoning, otherwise your lecturer is liable to make you look foolish. And we don’t want that.
userid}
authorname, title, classification}
And still later . . .
R1 is in 5NF. R2 is in 2NF.
R2 isn’t in 3NF, because there’s a transitive dependency between “isbn” and “authorname”.
Remove this transitive dependency by replacing R2 with these two projections (R3 and R4).
I don’t think there’s a functional dependency between title and classification.