(Contents)(Previous)(Next)

Updatable Join Views

In SQL systems, a view is a table that exists only virtually and whose contents are defined by a SELECT statement referring to permanent tables (base tables) or other views.

If at least two base tables are used in the FROM clause of the SELECT statement of a view definition, it is called a join view.

Whereas SQL systems usually do not permit modifying operations (INSERT, UPDATE, DELETE) in join views, these can be done with ADABAS. In this way, the view concept is extended considerably and enables, for example, attribute migration between tables without this having effects on existing application programs. Even complex application objects consisting of several tables can be made available with updatable join views.

The following constructs are not permitted in updatable join views:

- Subquery

- GROUP BY or HAVING

- DISTINCT

- UNION, INTERSECT, or EXCEPT

- Outer Join

The view must be defined WITH CHECK OPTION and contain the primary key columns of all tables involved. For master-detail (1:N) structures, a FOREIGN KEY must be defined between the tables involved.

A join view which satisfies these rules is updatable.


(Contents)(Previous)(Next)