4.2.2 Creating the Logical Model

A logical model reorganizes a physical view by mapping database tables and columns into 'Entities' and 'Attributes'. It exposes the physical view in a way that is more familiar to business users. A logical model is always based on a single physical view.

Entities group related business attributes together, and these attributes can be drawn from fields in any part of the underlying physical view. Style Intelligence automatically creates appropriate queries based on selected fields at runtime.

To build a logical model based on the 'SampleView' physical view (see Creating the Physical View), follow the steps below:

1. Expand the Asset panel.

2. Expand the 'Orders' data source node in the Asset panel.

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

 

4. In the 'Logical Model Wizard' enter “SampleModel” into the 'Name' field. Press 'Next'.

 

5. In the 'Physical View' menu, select 'SampleView', and press 'Finish'.

 

This closes the dialog box, and opens the logical model design view. The left-side View panel displays the tables from the physical view: 'SA.order_details', 'SA.orders', and 'SA.prod­ucts'.

6. Right-click in the empty region of the right-side panel, and select 'Add Entity' from the context menu. This opens the 'Entity Wizard'.

 

7. In the 'Entity Wizard', type “Order” into the 'Name' field, then press 'Finish'.

 

8. Expand the tables in the View panel, and drag the following columns onto the new 'Order' entity in the 'SampleModel' panel:

To sort the attributes within an entity, right-click on an attribute and select 'Sort by name'.

a. From the 'order_details' table, drag 'order_id' and 'quantity'.

b. From the 'orders' table, drag 'customer_id', 'order_date' and 'paid'.

c. From the 'products' table, drag 'category_id', 'price', and 'product_name'.

 

9. Press 'Save' to save the logical model. Data models are saved in the repository file datasource.xml.

This data model is now available to report designers and end users. For full information on creating logical models, see Logical Model in Data Modeling.

<< 4.2.1 Creating the Physical View © 1996-2013 InetSoft Technology Corporation (v11.5) 5 Getting Started with Data Mash-Up >>