Views Wizard (DB2 Z/OS)
Go Up to IBM DB2 for z/OS Object Wizards
A view gives you a new way of looking at data in a results table. Views behave like tables because you can query views and perform data manipulation operations on them. However, views do not actually store any data. Instead, they depend on data contained in their base tables. Columns added to the base table(s) after the view is created are not included in the result set. Views are thus handy tools for controlling access to a table. You can allow someone to see portions of data without allowing that user to see the table in its entirety. For example, you can create a view that will permit a user to see employee names in a table without allowing access to the Social Security numbers of that same table.
The wizard itself is a single panel. After you complete the wizard, the View Editor opens so you can complete the definition of the view, choose the columns to show in the view, the dependencies, and access privileges to the view.
To create a new view using a wizard:
- Open a creation wizard for a view. For details, see Opening an Object Wizard.
- Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:
- Properties panel - for details, see Views (DB2 z/OS) - Properties.
- Definition panel - for details, see Views (DB2 z/OS) - Definition.
- Finally, use the Execute button to create the object.
Views (DB2 z/OS) - Properties
When creating or editing a view, this tab/panel lets you work with the following settings:
Setting | Description |
---|---|
Owner |
Select the owner of the view. The owner of the view must have SELECT privileges for the tables in the CREATE view statement or DBADM authority on the database that contains the table. |
Name |
Provide a name for the view. |
Check Type |
CHECK_NONE - No search conditions must be satisfied for insert or update operations. CHECK_LOCAL - Update and insert operations on view must satisfy the search conditions of the view and underlying views that are defined with a check option. Furthermore, every updatable view that is directly or indirectly defined on view inherits those search conditions (the search conditions of view and all underlying views of that are defined with a check option) as a constraint on insert or update operations. CHECK CASCADED - Update and insert operations on the view must satisfy the search conditions of view and all underlying views, regardless of whether the underlying views were defined with a check option. Furthermore, every updatable view that is directly or indirectly defined on view inherits those search conditions (the search conditions of view and all underlying views) as a constraint on insert or update operations. |
Views (DB2 z/OS) - Definition
Complete the CREATE VIEW statement by typing or pasting in the relevant query.