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 6. Join Views I: One to One Joins

This phrase I have coined

For views to be joined—

Updating through V

Updates A, also B

Anon.:

I’d like to begin this chapter by repeating something I said at the end of Chapter 3:

The topic of view updating can unfortunately be quite confusing, even when it’s not particularly controversial. Part of the difficulty lies in the fact that there’s unavoidably a lot of detail to wade through, and it’s easy to lose one’s way in debates and discussions. In particular, it’s all too easy to forget, especially in examples, which relvars are base ones and which ones are views. It’s important to keep a clear head!

I repeat these remarks here because I think it’s only fair to warn you that they seem to be especially applicable in the case of join views in particular.

Given the foregoing, I thought it might be helpful to give some idea right at the outset of where we’re going to wind up in our investigations into this topic. Our target, of course, is a set of rules for updating through join. And what I claim we’re going to finish up with is a set of rules—a single, uniform set of rules—that work for all joins.[81] In particular, it’s not going to make any difference whether the join we’re dealing with is one to one, one to many, or many to many. In fact, let me immediately show in outline what the rules in question look like. Assume we’re trying to update a view V defined as A JOIN B. Then the rules can be stated as follows:

ON INSERT INTO V : INSERT A (sub)tuples ...

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