View Properties

You can modify an object's properties from its property sheet. To open a view property sheet, double-click its diagram symbol or its Browser entry in the Views folder. The following sections detail the property sheet tabs that contain the properties most commonly entered for views.

The General tab contains the following properties:

Property

Description

Name

Specifies the name of the item, which should be clear and meaningful, and should convey the item's purpose to non-technical users.

Code

Specifies the technical name of the object, which is used for generating code or scripts, which may be abbreviated, and should not generally include spaces.

Comment

Specifies a descriptive label for the view.

Stereotype

Sub-classification used to extend the semantics of an object without changing its structure; it can be predefined or user-defined.

Owner

Specifies the name of view owner. You choose an owner from a list of users. A view can only have one owner at a time. This is normally the view creator.

Usage

Specifies the use of the view: Query only defines a view for consultation only, view cannot update tables; Updatable defines a view for consultation and update, view can update tables; and With Check options implements controls on view insertions.

Dimensional type

Specifies the multidimensional type of the view, that is Dimension or Fact.

Type

Specifies the type of the view, where supported by your DBMS.

For information about DB2 and SQL Anywhere materialized views, see Materialized Views.

For information about XML views, see Creating an XML Table or View.

Generate

Includes view generation as part of database generation script.

User-defined

When selected, makes sure the view query is not parsed by PowerDesigner internal parser. This protects the view query from any update using model objects and keeps its syntax as defined by user. Otherwise, the view query is parsed and modified according to model values.

The following tabs are also available:
  • Columns - lists the columns in the view based on the SELECT orders from the queries. To add or remove columns from this list, you must modify the appropriate query.

    If the view was created from one or more tables or views, the name, code, comment, and data type of the view column are those of the corresponding column in the linked table or view.

    If the view is not linked to another object, the name and code of the view column comes from the column name in the first query in the view definition. For example, MyView is defined by the following query:
    select Name, Comment
    from Property
    union
    select Signature, Body
    from Method
    In this case, if you modify the view column code (for example, renaming Name to ClientName, the view creation script will reflect the change:
    create view MYVIEW (ClientName, "Comment") as
    select Name, Comment
    from Property
  • SQL Query - Displays the SQL code for all the queries associated with the view. You can edit this code directly in this tab or access the property sheets of individual queries (see Working with View Queries).
  • Triggers - [if your DBMS supports triggers on views] Lists the triggers associated with the view. You can define a trigger to fire when one or more attributes of a table view column are modified. For information about working with triggers, see Building Triggers and Procedures).
  • Preview - Displays the SQL code to be generated for the view (see Previewing SQL Statements).