Consider the universal relation R = {A, B, C, D, E, F, G, H, I} and the set of functional dependencies F = { {A, B} -> {C}, {A} -> {D, E}, {B} -> {F}, {F} -> {G, H}, {D} -> {I, J} }. What is the key for R? Decompose R into 2NF, then 3NF relations.
What will be an ideal response?
A minimal set of attributes whose closure includes all the attributes in R is a key. (One
can also apply algorithm 15.4a (see chapter 15 in the textbook)). Since the closure of
{A, B}, {A, B}+ = R, one key of R is {A, B} (in this case, it is the only key).
To normalize R intuitively into 2NF then 3NF, we take the following steps (alternatively,
we can apply the algorithms discussed in Chapter 15):
First, identify partial dependencies that violate 2NF. These are attributes that are
functionally dependent on either parts of the key, {A} or {B}, alone. We can calculate the
closures {A}+ and {B}+ to determine partially dependent attributes:
{A}+ = {A, D, E, I, J}. Hence {A} -> {D, E, I, J} ({A} -> {A} is a trivial dependency)
{B}+ = {B, F, G, H}, hence {A} -> {F, G, H} ({B} -> {B} is a trivial dependency)
To normalize into 2NF, we remove the attributes that are functionally dependent on part
of the key (A or B) from R and place them in separate relations R1 and R2, along with
the part of the key they depend on (A or B), which are copied into each of these relations
but also remains in the original relation, which we call R3 below:
R1 = {A, D, E, I, J}, R2 = {B, F, G, H}, R3 = {A, B, C}
The new keys for R1, R2, R3 are underlined. Next, we look for transitive dependencies
in R1, R2, R3. The relation R1 has the transitive dependency {A} -> {D} -> {I, J}, so we
remove the transitively dependent attributes {I, J} from R1 into a relation R11 and copy
the attribute D they are dependent on into R11. The remaining attributes are kept in a
relation R12. Hence, R1 is decomposed into R11 and R12 as follows:
R11 = {D, I, J}, R12 = {A, D, E}
The relation R2 is similarly decomposed into R21 and R22 based on the transitive
dependency {B} -> {F} -> {G, H}:
R2 = {F, G, H}, R2 = {B, F}
The final set of relations in 3NF are {R11, R12, R21, R22, R3}
You might also like to view...
You can change to black and white by converting the image to the LAB Color mode, creating a layer from the ____ channel.
a. Monochrome b. Black and White c. Lightness d. Brightness
Which statement is false?
a. The actual data representation used within the class is of no concern to the class’s clients. b. Clients generally care about what the class does but not how the class does it. c. Clients are usually involved in a class’s implementation. d. Hiding the implementation reduces the possibility that clients will become dependent on class-implementation details.
A method marked as final means the compiler uses ________ binding.
a. dynamic b. early c. late d. none of the above
Windows Product Activation (WPA) uses an update called Volume Activation for activation on multiple computers
Indicate whether the statement is true or false