SDB_View - View definition
A view definition allows defining the elements of a database view. A view is considered as method of a structure (or a combination of structures), which is called the structural (or intentional) base of the view. The structural base is defined in the FROM clause of the view.
The result of a view can be stored as persistent view by making the view persistent. This allows defining one or more ODABA extents for storing the view. Persistent views are not updated automatically, but must be updated by the user.
The view structure is defined by a number of properties (attributes and references) in the view. Defining relationships makes sense in case of persistent views, only. All properties defined for a view should have a source definition, which defines the expression or path for the property. Properties, which do not have a source definition, can be evaluated in an appropriate context class or the view structure or the property.
One may define views based on views or properties based on view structures. When a property is defined with a view structure as type, the view applies on the source for the property, which is defined in the constraint. When applying a view to a property, one may refer directly to a source property (or property path or expression) or to a local view extent.
Aggregated views can be defined by using the group_by clause. Aggregated views always contain a value and a partition property. Other properties can be defined by means of aggregation expressions for the partition collection.
One may define one or more keys for the view, which consist of view attributes. Those keys can be used for creating indexes for persistent views. Aggregated views do always have an identifying key __ident_key.
Views can be used as reading or updating views. One may, however, update only those properties, which are connected with its source directly via property paths. This is possible also via several steps, i.e. when defining views on views. As soon, as at least one expression is defined on the way to the database source for a property, this property cannot be updated.
- group - Group specifications