O'Reilly logo

Database Design and Relational Theory by C.J. Date

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

THE FIRST EXAMPLE REVISITED

Now let’s return to our motivating example, in which relvar S was decomposed “vertically” into its projections SNC and STC on {SNO,SNAME,CITY} and {SNO,STATUS,CITY}, respectively. (The example of light vs. heavy parts involved horizontal decomposition, of course.) Observe now that although SNC and STC are certainly of the same degree, there’s no way any given tuple can appear in both: Tuples in SNC have an SNAME attribute, while tuples in STC have a STATUS attribute instead. What’s more, there’s no way we can simply rename (say) the SNAME attribute in SNC to STATUS and thereby produce a relvar with the same heading as STC, because SNAME in SNC is of type CHAR and STATUS in STC is of type INTEGER. (Renaming attributes changes names, not types.) It follows that our second attempt at defining the orthogonality principle is still inadequate; in the case at hand, in fact, it simply doesn’t apply.

Recall now what the problem was with the foregoing design: The tuple (s,c) appears in the projection of SNC on SNO and CITY if and only if that very same tuple (s,c) appears in the projection of STC on SNO and CITY. That is, the following EQD holds:

     CONSTRAINT ... SNC { SNO , CITY } = STC { SNO , CITY } ;

Let’s agree to ignore the question of attribute renaming for the moment, since it isn’t relevant to this example. Then the crucial point is that this EQD holds, not between distinct database relvars as such, but rather between distinct projections of the same database ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required