We extend the previous example of multivalued dependency employee-number →→ programming-language | operating-system by adding a multivalued attribute "hobby". Assuming that an employee has many hobbies multivalued dependency is "upgraded" to join dependency:
⋈(employee-number, programming-language, operating-system, hobby)
A definition of the same join dependency is more expressive in the following tabular format:
employee-number programming-language
employee-number operating-system
employee-number
employee-number hobby
-------------------------------------------------------------------------------------------------
employee-number programming-language operating-system hobby
In another example, a person owns many cars and has many skills and has many employers. Such a domain contributes to the following join dependency:
⋈((first-name, last-name),registration-number, skill, employer)
If a relational table R is crated oveer a schema that satisfies a join dependency:
X Y1
X Y2
X Y3
... ... ... ...
X ... ... ... YN
------------------
X Y1 Y2 Y3 ... YN
then a join of projections of the relational table on XY1, XY2, ... XYN is always equal to the relational table R, please SQL below:
CREATE VIEW XY1 AS (SELECT X,Y1 FROM R);
CREATE VIEW XY2 AS (SELECT X,Y2 FROM R);
... ... ... ... ... ... ... ... ... ...
CREATE VIEW XYN AS (SELECT X,YN FROM R);
SELECT XY1.X, XY1.Y1, XY2.Y2, ... XYN.YN
FROM XY1 JOIN XY2 ON XY1.X = XY2.X JOIN ... JOIN XYN ON XY1.X = XYN.X
The result of SELECT statement above is always equal to R