databaserelational-databasenatural-join

Non-First Normal Form natural join operation


I have 2 tables in non-first normal form:

enter image description here

What would be the result of the NATURAL JOIN operation of these two table?


Solution

  • It is not exactly clear what your picture is supposed to represent. I'm going to assume that R1 is a relation with three attributes, A,B and X; R2 is a relation with three attributes, E,B and X.

    The natural join would be a join where the values in B and X are equal in both R1 and R2. What type of attribute is X? If X is a relation-valued attribute and the columns labelled C and D represent the tuples in X then it seems that the relation values are different in each case. (X in R1 and X in R2 happen to have some of the same tuple values in common but the values of relation X are different in each case).

    So the result of the natural join would be an empty relation with a heading of A,B,E,X but with zero tuples.