Answer:
The key of R is {A, B}
Explanation:
A key can be seen as a minimal set of attributes whose closure includes all the attributes in R.
Given that the closure of {A, B}, {A, B}+ = R, one key of R is {A, B} But in this case, it is the only key.
In order for us to to normalize R intuitively into 2NF then 3NF, we have to make use of these approaches;
First thing we do is to 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}