The last section of this chapter presented four main rules that characterize updatable views in SQL. The third rule states that if the WHERE clause contains a nested subquery, none of the tables mentioned in that subquery (explicitly or implicitly) can be the table used in the FROM clause of the viewde?nition.
Construct a viewthat violates condition 3 but satis?es conditions 1, 2, and 4 for updatability, such that there is an update to this viewthat has two di?erent translations into the updates on the underlying base relation.
Consider two relation schemas, R(Att1,Att2)andS(Att1,Att2), and a view:
```
CREATE VIEW V(Att1)
SELECT A.Att1
FROM V A
WHERE EXISTS (
SELECT *
FROM S B
WHERE B.Att1 = A.Att1 AND B.Att2 = A.Att2 )
```
Here the base table of the view, R, is implicitly mentioned in the subquery (through the tuple variable A). Now, suppose we want to delete a tuple of the form a, b from V. There are two translations: to delete all tuples of the form a, ? from R or from S.
You might also like to view...
A URL is made up of four distinct parts, each telling you something specific about the website you are attempting to access
Indicate whether the statement is true or false
The ________ is an example of a function used for input validation
A) prompt() B) isNaN() C) toUpperCase() D) parseFloat()