简体   繁体   中英

Database normalization - 4NF

I have the following relation and I need to normalize it to 4NF .

Relation

First I've tried to find all the FD's and MVD's that hold.

AB ->> C (MVD)
C -> D (FD)  
D -> E (FD)
ABC -> F (FD)

Next, using these dependencies I've managed to find the candidate key: ABC . Let me know if what I've done so far is right. Also, is it ok to have a multivalued dependency in 4NF? Like AB ->> C and ABC -> F ?

Thanks.

In general dependencies describe important constraints on the data, for instance a functional dependency X → A means that a certain value of X determines uniquely a certain value of A (that is, each time we find in a tuple a certain value of X , we always find the same value of A ). Such kinds of constraints cannot be inferred by (few) rows of a table, in which is unknown the meaning of the data.

At the best, we can infer a set of possible functional dependencies holding in that particular instance of the table, hoping (but without any particular reason) that those functional dependencies will hold on every instance of the table, which is the only condition for which we can “normalize” the relation (and not simply find a non-redundant way of storing a particular instance of that table).

In your case, for instance, since the table has very few rows, many functional dependencies could be seen as holding in it, for instance at least the following:

F → AB
E → AD
D → AE
C → ADE
B → A
EF → ABCD
DF → ABCE
CF → ABDE
CB → ADEF

(while ABC → F can be derived from CB → ADEF , and AB →→ C does not hold).

And if we should apply a normalization algorithm to that instance (for instance the synthesis algorithm for 3NF), we will decompose the relation in an exaggerate number of subschemas:

R1(AB), R2(BCF), R3(CD), R4(ADE), R5(CEF),

five relations for a table with six attributes!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM