Define AlloyDB Materialized Views

Use the AlloyDB Materialized View Editor to define a materialized view for query in a AlloyDB physical model.

To define a AlloyDB materialized view

  1. In the Model Explorer, right-click Materialized Views and click New.

    An instance of Materialized View is created.

  2. Right-click the instance and click Properties.

    The AlloyDB Materialized View Editor opens.

  3. In the navigation grid, select the materialized view that you want to define and work with the following options:

    Click New New icon in property editors to create a new object on the toolbar to create a materialized view. Use the Enter filter text box to filter a very large list of materialized views to quickly locate the one that you want to define.

    Name

    Specifies the name of the materialized view. Set the name of the view in this field.

    Schema

    Specifies the schema for the materialized view. Select a schema from the drop-down list or click New New icon in property editors to create a new object to create one.

    Generate

    Generates SQL during forward engineering. Clear the check box if you do not want to generate SQL.

  4. On the AlloyDB tab, work with the following options:
    Tablespace

    Specifies the name of the tablespace in which the new materialized view is to be created. If not specified, default_tablespace is consulted.

    Storage Parameters

    Specifies optional storage parameters for the materialized view. All parameters supported for a table are also supported for materialized view, except for the OIDs.

    No Data

    Specifies whether the materialized view should be populated at creation time.

  5. Work with the other tabs in the editor to access additional design features, for example:
    • Specify the tables or views to define the view column in the Select tab.
    • Select the tables and views that you want to participate in the view using the From tab.
    • Enter text to define a WHERE clause in the Clauses tab.
    • View and change a user-provided DDL statement in the User Defined SQL tab.
    • View the SQL code used during Forward Engineering using the SQL tab.
    • Work with style sheets which are used to format the font and other graphical themes used in the display of the view in the Style tab.
    • Specify the icon style to use for the view in the Icon tab.
  6. (Optional) Click the Comment tab and enter any comments that you want to associate with the object.
  7. (Optional) Click the Where Used tab to view where the object is used within the model.
  8. (Optional) Click the UDPtab to work with user-defined properties for the object.
  9. (Optional) Click the Notestab to view and edit user notes.
  10. (Optional) Click the Extended Notes tab to view or edit user notes.
  11. Click Close.

    The materialized view is defined and the AlloyDB Materialized View Editor closes.

For more information, refer to AlloyDB documentation.