O'Reilly logo

View Updating and Relational Theory by Chris 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

Chapter 5. Projection Views

Updating projections?

Just follow directions!

Anon.:

Now I want to consider what’s involved in updating projection views (i.e., “updating through” a projection operation). Note: I claimed in the previous chapter that restriction and union views are two sides of the same coin, so to speak; well, a similar remark applies to projection and join views, as we’ll see in this chapter and the next three.

Let me give you some idea as to how the chapter is structured. The discussion overall centers round a set of examples—three of them, to be exact. The first two both have to do primarily with situations in which we have full information equivalence; the third shows what happens if we don’t (i.e., if certain information is hidden). In all three cases, I’ll appeal to The Principle of Interchangeability and begin by considering what happens if all of the relvars concerned are base ones; then I’ll go on to see how the situation changes if some of them are in fact views.

Example 1: A Nonloss Decomposition

Let’s agree for simplicity to drop attribute SNAME from the suppliers relvar, so that throughout this chapter the name “S” refers to the following reduced form of that relvar:

S { SNO , STATUS , CITY } KEY { SNO }

(As you can see, I haven’t just dropped attribute SNAME, I’ve also abbreviated the relvar definition considerably. In particular, I’ve omitted the attribute type specifications, again in the interest of simplicity.)

Now let relvars ST and SC be defined as projections ...

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