Database views
A database view is a subset of a database and is based on a query that runs on one or more database tables. Database views are saved in the database as named queries and can be used to save frequently used, complex queries.
There are two types of database views: dynamic views and static views. Dynamic views can contain data from one or two tables and automatically include all of the columns from the specified table or tables. Dynamic views are automatically updated when related objects or extended objects are created or changed. Static views can contain data from multiple tables and the required columns from these tables must be specified in the SELECT and WHERE clauses of the static view. Static views must be manually updated when related objects or extended objects are created or changed.
When you create a dynamic view with data from two tables, you must ensure that both tables have the same PRIMARYKEYCOLSEQ columns or contain unique indexes with the same column name in the same order.
Database views are populated depending on the object on which they are based. For example, if you add or remove an attribute from the WORKORDER object, the attribute is either added or removed from the dynamic view that is based on the object. When you change an attribute, not all changes are applied to the associated database view. For example, if you change the data type of an attribute, the change is applied to the database view. However, if you change or add a domain to the default value of the WORKORDER object, the change is not automatically applied to the database view. Instead, you must apply this change to the database view.