Building a data model
Once you create a data object, a data source, and data sets, you can use the data sets to build a data model. Using a data model as a data source is preferable to using a data cube or an information object for the following reasons:
*Data model queries are optimized and therefore offer better performance.
*When creating crosstab reports, a data model offers more flexibility in the choice of dimensions and measures.
Typically, a data model consists of several data sets linked by joins. For example, Figure 10‑16 shows the Customers, Orders, and OrderDetails data sets. The Customers and Orders data sets are joined on the CUSTOMERNUMBER column, and the Orders and OrderDetails data sets are joined on the ORDERNUMBER column. The fields in the data sets are visible in the Available Data pane in Report Studio, the Categories pane in Interactive Crosstabs, or the Manage Data dialog in BIRT dashboards when the data model is used as a data source.
If you make changes to a data model, right-click in Report Outline and choose Refresh Data Object to propagate the changes to the report design.
If you plan to use a data set in a data model, do not set the Create Index property for any of its columns to true. Setting Create Index to true increases the data object creation time and size.
How to create a data model
1 Create a data object.
2 Create a data source.
3 Create data sets.
4 In Data Explorer, right-click Data Models and Data Cubes and choose New Data Model.
5 In Data Model, create the appropriate joins by dragging the join column from one data set to the join column in another data set, as shown in Figure 10‑16. BIRT Designer Professional creates an equijoin. Multi-key joins are also supported.
Figure 10‑16 Joining data sets in a data model