Previous Topic: Enter Index User-Defined Property Values

Next Topic: Editors for Managing Views

Views

In a physical model, you can create views, which are SQL queries that are permanently stored in the database under assigned names. The result of a view query is a virtual table. To the database user, a view appears just like a real table with a set of named columns and rows of data. However, a view is not a permanently stored set of data values. The rows and columns of data visible through the view are the result of the database query that defines the view.

You can use views in SQL to:

Views are supported in the following features:

When you add a view to a model, it appears as a box with a dotted outline and round corners, and a view relationship as a dotted line with circle at the view end of the line. A view relationship between a table or view and a view indicates that the view references one or more of the columns from that table or view.

A view column can be a reference to a table column, a reference to a column in different view, or a user-defined expression.

After you draw a view relationship between a table and a view, you must use on-diagram editing or the View Editor to migrate columns in the table to the view.

You can edit views directly in the diagram window using on-diagram editing. When you drag a column from a table into a view, the view column and the view relationship are created. You can drag a view column out of a view to remove it from the view.

If you delete a table column that is referenced by a view, the corresponding view column is deleted. If you delete a table that is referenced by a view, the corresponding view columns are deleted.

You can add a view using any of the following methods:

Note: You can add consecutive multiple views by pressing the Ctrl key before you click the view tool. When you click again in the diagram window, another view is created.

More information:

Views in the Model Explorer

Editors for Managing Views

View Editor

View Column Editor

View Relationships Dialog