Databases Reference

In-Depth Information

Here's another example of a JD that happens to be satisfied by the current value of relvar S (and in fact by all

legitimate values of that relvar):

{ { SNO , SNAME , CITY } , { CITY , STATUS } , { CITY , STATUS } }

This JD corresponds to a nonloss decomposition in which one of the projections isn't needed in the reconstruction

process. In fact, it's clearly equivalent to the first of the four shown previously
1
─

{ { SNO , SNAME , CITY } , { CITY , STATUS } }

─implying that one of the two identical components can be dropped without significant loss. For such reasons, I'll

feel free to refer to the components of any given JD as constituting a set, even though the commalist of components

in the written form of that JD might contain repetitions (duplicates), which sets per se never do. (That's why that

commalist is enclosed in braces, of course.)

To continue with the definitions:

Definition:
Let relation
r
have heading
H
and let
{
X1
,...,
Xn
} be a JD,
J
say, with respect to
H
. If
r
is

equal to the join of its projections on
X1
, ...,
Xn
, then
r
satisfies
J
; otherwise
r
violates
J
.

Observe that it's relations, not relvars, that satisfy or violate some given JD. For example, the relation that's

the current value of relvar S satisfies both of these JDs─

{ { SNO , SNAME , CITY } , { CITY , STATUS } }

{ { SNO , SNAME } , { SNO , STATUS } , { SNAME , CITY } }

─and violates this one:

{ { CITY , SNO } , { CITY , STATUS , SNAME } }

Note that the question of that relation satisfying or violating the JD
{{SNO,CITY},{CITY,STATUS}}─the last of

our original set of four sample JDs─doesn't arise, because that JD isn't defined with respect to the heading of that

relation.

Definition:
Let relvar
R
have heading
H
and let
{
X1
,...,
Xn
} be a JD,
J
say, with respect to
H
. Then the JD

J
holds
in relvar
R
(equivalently, relvar
R
is subject to
the JD
J
) if and only if every relation that can ever be

assigned to relvar
R
satisfies
J
. The JDs that hold in relvar
R
are
the JDs of
R
.

Please note the terminological distinction I'm drawing here─JDs are
satisfied
(or are violated) by relations,

but
hold
(or don't hold) in relvars. I'll adhere to this distinction throughout what follows. By way of example, the

following JD holds in relvar S─

{ { SNO , SNAME , CITY } , { CITY , STATUS } }

─and these ones don't:

1
In general, two JDs are
equivalent
if and only if every relation that satisfies either one also satisfies the other. I'll have more to say on this topic

(equivalence of JDs) in the next chapter.