of V.
– a key column or a foreign key column s' of a referential CONSTRAINT definition that is relevant to V exists that can be derived from V and the JOIN predicate s=s' is part of the search condition of V.
A column v of V corresponds to a column s of a base table T if one of the following conditions is satisfied
- v is the ith column of V and s is the ith selected column of V
- v corresponds to a key column PK of Tj of a referential CONSTRAINT definition Rij that is relevant to V and s is the foreign key column of Ti that is assigned to PK
- v corresponds to a foreign key column FK of Ti of a referential CONSTRAINT definition Rij that is relevant to V and s is the key column of Tj that is assigned to FK.
A join view table V is updateable if the following conditions are satisfied:
- Each base table Ti (1 <= i <= n) has a key defined by the user.
- The database system must be able to determine a processing sequence for the underlying base tables; i.e. an order Ti1,…,Tin of the tables T1,…,Tn must exist so that j < k can be deduced from Tij<Tik. The columns of V from which the key columns of Ti1 can be derived make up the key of V. Ti1 is called the key table of V. The order of the tables does not have to be unique.
- Starting with a row in the key table of V, it must be possible to assign each underlying base table exactly one row; that is, there is a sequence of tables Ti1,...,Tij for each table Tij (1 <= j <= n) such that Ti1 < .. < Tij
This sequence is unique for each base table referred to by V.
- It must be possible to derive the key columns and foreign key columns of all referential CONSTRAINT definitions relevant to V from the columns of V.
- The join predicates needed to recognize the relevance of a referential CONSTRAINT definition must be specified in parts of the search condition defined with the WITH CHECK OPTION. If the view definition only contains base tables, this means that the view table must be defined WITH CHECK OPTION. If a view table V is derived from a view table V' and if V' was defined WITH CHECK OPTION, then V inherits the CHECK OPTION for the part of the qualification passed on by V'.