4.2.1 Creating the Physical View
The first step to creating a data model is to create a physical view. A physical view captures the relationships (joins) among a set of tables, and may encompass all or part of the underlying database schema.
In the following example, you will first create a new physical view using the predefined 'Orders' data source. You will then create a logical model based on this physical view to provide the order details for products.
To create the physical view, follow the steps below:
1. Expand the Style Studio Asset panel.
2. Expand the 'Orders' data source node in the Asset panel.

3. Right-click the 'Data Model' node, and select 'Add Physical View' from the context menu. This opens the 'Physical View Wizard'.

4. In the 'Physical View Wizard', type “SampleView” in the 'Name' field and press 'Finish'.

This opens the new physical view for editing.
5. Expand the 'TABLE' tree in the Database panel, and expand the 'SA' node.
6. Drag the following tables to the right panel: 'ORDER_DETAILS', 'ORDERS', and 'PRODUCTS'.

7. Create the joins between the tables as follows:
Note: There may be a slight delay as join cardinality is analyzed.
a. Drag the 'PRODUCT_ID' field from the 'ORDER_DETAILS' table, and drop it onto the 'PRODUCT_ID' field in the 'PRODUCTS' table.
b. Drag the 'ORDER_ID' field from the 'ORDER_DETAILS' table, and drop it onto the 'ORDER_ID' field in the 'ORDERS' table.


8. Press 'Save' to save the physical view.
You have now finished creating the physical view. Note that the physical view does not represent a specific query. Rather, the join relationships that you established between the tables provide the foundation on which queries will be automatically generated when a user requests fields of the data model.
If you make a change to the structure of the database schema, press the 'Refresh Metadata' button on the toolbar to update the physical view.
Physical views are independent of one another; that is, join relationships defined in one physical view do not impact join relationships defined in another physical view. For full information on physical views, see Physical View in Data Modeling.
| << 4.2 Getting Started With Data Models | © 1996-2013 InetSoft Technology Corporation (v11.5) | 4.2.2 Creating the Logical Model >> |