Designing Data Model using Model Design Accelerator

A Practical Approach

This is another document from “Cognos Reporting and Framework manager for Beginner’s” series. This document provides overview of Framework Manager, Architecture, Creating Data Source Connection and Project using Model Design Accelerator, Data Model Creation in Framework Manager.

History:
Version
0.1 0.1

Description Change
Initial Draft Review 01

Author Mitesh Agrawal
Amit Sharma
|

Publish Date
12-Oct-2011 12-Oct -011
1

Designing Data Model using Model Design Accelerator

http://learncognosreports.wordpress.com

Table of Contents• • • • •

Create Data Sources and Project Using Model Design Accelerator.……..3 Model Organization in Framework Manager.........................................25 Verify the Relationship………………………………………….……………………..……32 Verify the Model……………………………………………………………….………………34 Verify the Data...…………………………...…………………………………………………39

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

2

Create Data Sources and Project Using Model Design Accelerator: The first step in order to create data model is to setup the data source connection. Before creating Data Sources and Project in Framework Manager using Model Design Accelerator, you will put the database files(Metedata Files) in one of the Data Base. Here I put Sample Sales database files in the Microsoft SQL Server 2005. Follow the below sequences to put database fileG:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data Now we will Attach Database Files in Microsoft SQL Server. In the below examples we are using SQL Server, however you can use other RDBMS. Steps for attach the database file is given below

Go to StartAll ProgramsMicrosoft SQL Server 2005SQL Server Management Studio.

 Connect to Server, type Login ID=’sa’ and Password , the same password you have given

during installation, press ‘connect’ button.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

3

 Now Right click on Database Attach.

 Add the Database Files here by click Add button.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

4

 After attach database file, we will press ’OK’.

 We can view database files have been attached successfully, now press ’OK’.

 You can view database, name as samplesales on the screen as given belowDesigning Data Model using Model Design Accelerator | http://learncognosreports.wordpress.com

5

 You can view the samplesales database, tables and columns in the tables on ‘Object Explorer’

in left side of window.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

6

Steps to Create a Project in Framework Manager Using Model Design AcceleratorGo to StartAll ProgramsIBM Cognos BI Developer EditionIBM Cognos Framework

Manager.

Click on create a new project using Model Design Accelerator of Framework Manager welcome page.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

7

In a new project page, give project name and location for creating a new project and click ‘OK’.

Type User ID and Password in the corresponding block for authentication. If you provided password during the installation, then write password here ,otherwise keep it blank and click ‘OK’.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

8

In the selected language page, select the design language for the project and click

‘OK’.

Select a data source connection, if you have created previously and click next. If you didn’t create data source connection then, create a new data source connection by click on ‘New’ button. In my case here I will create a new data source connection.

New data source wizard page appear, it helps you to create a new data source and click ‘Next’.

Designing Data Model using Model Design Accelerator | http://learncognosreports.wordpress.com

9

 Specify a name and location and click ‘Next’. The description and screen tips are optional.

 Specify a Type for the connection of this new data source.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

10

 Now from Type: drop down list will appear, select the Microsoft SQL Server (SQL 2005 Native

Client) database and for Isolation level, click the default object gateway check box and click ‘Next’.

 Specify a server name (which is same as full computer name) ,and Data base name.

NOTE- To see the Server Name, follow the steps given belowGo to Start->My Computer->Properties->Computer Name.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

11

 Now select a signons check box and type the User ID= ‘sa’ and Password, then click on ‘Test the

connection’.

 Click ‘Test’, to make up the database connection.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

12

 The Result will be display,If the path specified here is correct and the status is succeeded, then

Press ‘Close’.

 Following screen will be display the database connection, now click ‘Close’.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

13

 New Data Source Page will appear and Press ‘Next’.

 Now click ‘Finish’ button.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

14

 The New Data Source Wizard successfully created a data source and press ’Close’.

 Select the data source for creating metadata model, which we have created and press ‘Next’

button.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

15

 Select the check boxes for the object, which we want to use in the Model Design Accelerator

and click ‘continue’.

The Model Design Accelerator Page will appear and click ‘Close’ button..

 The Model Design Accelerator Page will appear, it contains the Explorer Tree Pane and Model

Accelerator Pane.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

16

 In the Model Accelerator Pane, Right Click the Fact Table Query Subject in the center of the pane

and click Rename. Here I am specify a name as Fact Revenue to this Fact Table Query Subject .

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

17

In the Explorer Tree Pane, expand Fact Table Query Subject and drag the selected Query Items & drop it in the Fact Table Query Subject,which is in the center of Model Accelerator Pane.

We can view the selected Query Items will be appear in the Fact Revenue Query Subject ,which is in the center of Model Accelerator Pane.

Similarly, In the Explorer Tree Pane, expand Dimension Table Query Subject and drag the selected Query Items & drop it in the any Dimension Table Query Subject , of Model Accelerator Pane and right click the New Table Query Subject and click Rename and specify a new name.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

18

We can view the selected Query Items will be appear in the New Query subject ,which appear as Dim Customer of Model Accelerator Pane and the relationship between Dimension and Fact Query subject automatically generates.

Similarly, In the Model accelerator Pane, Right Click any New Table Query Subject and click Rename and specify a new name to this New Query Subject. In my case ,I am specify a name as Dim_Segment.
| http://learncognosreports.wordpress.com

Designing Data Model using Model Design Accelerator

19

Similarly, From the Explorer Tree Pane, we can expand more Dimension Table Query Subject and drag the selected Query Items & drop it in the Dimension Table Query Subject, which were you specify a new name, of Model Accelerator Pane.

[Remember -To add New Query Subject use this icon( icon( )]

) and to create a relationship use this

The Relationship Editing Mode for: Segment Dialog Box open, as you can view in the below screen. This dialog box opens because IBM Cognos Framework Manager can’t determine the relationship between the Dim Segment table and Dim Customer table. So we need to establish
| http://learncognosreports.wordpress.com

Designing Data Model using Model Design Accelerator

20

the relationship between tables yourself and Ctrl-click the Dim_SegmentSegment_Id and Dim_CustomerSegment_Id.

Modify the Relationship window will appear, it shows the One to many relationship between Segment and Customer Table and click ‘Ok’.

Again Click ‘Ok’ to close the Relationship Editing Mode dialog box.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

21

Now click Generate Model.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

22

A Framework Manager model will generate and Model Design Accelerator will close. Do you want to continue press ‘Yes’. The Model Design Accelerator creates a model based on your selections. When complete, the model will appear in the IBM Cognos Framework Manager UI.

Model Organization in Framework Manager

The Model Design Accelerator follows the layered modeling approach and creates a threelayered model automatically. We can view the three-layered model in the Project Viewer.

The Physical View, contains the data source query subjects as they were when imported from the data source. The Physical View Layer is shown in figure.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

23

By default, it will provide you a Query Subjects and Query Items which will appear in the IBM Cognos Framework Manager UI. After create a relationship, we can view the circular joins among Facts_Rev,Dim_Product,Facts_Inv and Dim_Market tables. To remove circular joins , we need to create a Alias Table.

Steps to create an Alias Table To create Alias Table Right-click on a Physical Table Create  Alias Shortcut. Here I will Create

a Alias table to Dim_Product Table.

We can view the shortcut to Dim_Product Query Subject in the below screen.
| http://learncognosreports.wordpress.com

Designing Data Model using Model Design Accelerator

24

Create Relationship between Query Subjects

Now we will create a relationship between shortcut to Dim_Product and FactInv Query subject.

The Relationship Definition window will appear. This window will show us relationship between shortcut to Dim_Product and FactInv Query subjects and join operator (Equi Join) between them and press ‘Ok’.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

25

We can view the relationship has been created between shortcut to Dim_Product and FactInv Query subjects. Similarly we can create a more Alias to Query subject.

After creating a relationship between all the Dimension and Fact Query Subjects We can view the Physical Data Model ,which will appear in the Physical View of IBM Cognos Framework Manager UI.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

26

The Business View, shown in Figure, typically consists of model query subjects that are used either to remodel the Physical View to meet reporting requirements or to consolidate information from the Physical View for a cleaner presentation of the metadata to the user.

In my case, Model Design Accelerator will automatically merge the Dim_Segment and Dim_Customer Query Subjects.After creating a relationship between all the Dimension and Fact Query Subjects, We can view the Business Data Model , which will appear in the Business View of IBM Cognos Framework Manager UI.
| http://learncognosreports.wordpress.com

Designing Data Model using Model Design Accelerator

27

 The Presentation View, shown in Figure, typically contains star schema groupings, which are

logical groupings of fact and related dimension query subject shortcuts.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

28

Verify the Relationship
 To create a relationship between Dimesion and Fact Query subjects , just click the relationship

icon , which will appear on the Tool Menu of Framework Manager. Here we will create a relationship between Time and Facts Query subjects. [Remember -To create a relationship use this icon( )]

The Relationship Definition window will appear. This window will show us relationship between Time and Facts Query subjects and join operator (Equi Join) between them and press ‘Ok’.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

29

 We can view that one-to-many relationship has been created in between Time and Fact Query

Subjects. After create a Relationship among all the Dimension and Fact Query Subjects, the data model will create. Remember that, one-to-many relationship should be in between Dimension and Fact Query Subjects.

Verify the Model
 To verify the entire model, right click the root model namespace, in my case called

ModelVerify Selected Objects.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

30

The Verify Model-Options Dialog Box will appear. Select the verify model options to run and Click ‘Verify Model’ button.

 Verify Model Results dialog box will appear, No Issue detected during model verification and

Press ‘Close’.

 We can also verify the objects in the model. To do this we will use Model Advisor Tool.

To run the Model Advisor, use the following stepsDesigning Data Model using Model Design Accelerator | http://learncognosreports.wordpress.com

31

Right Click the namespace that you want to examine. In my case Go to Sample Sales Run Model Advisor

 The Model Advisor dialog box will appear, by default it will provide us already marked check

boxes, please try to keep it same and click ‘Analyze’ button.

 The Model Advisor results dialog box will appear, we can identify items that fits certain

categories. Now click the icon( appear in the red rectangular box) under the Action column to view the objects in the context explorer.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

32

 The Context Explorer - Model Advisor will appear, and we can view the objects in the context

explorer.

 Again click the icon (appear in the red rectangular box) under the Action column to view the

objects in the context explorer.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

33

 The Context Explorer - Model Advisor will appear, and we can view the objects in the context

explorer.

 Click ‘Close’ button.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

34

Verify the Data
 In the Project Explorer, expand the Business View , select Product Name(Prod_Name) from

Product Dimension Query Subject and Profit from the Fact Query Subject.

 Right Click any one of the selected items and click ‘Test’.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

35

 Test Result dialog box will appear, now select the Auto Sum check box to emulate the default

IBM Cognos BI behavior and click Test Sample button.

 After click Test Sample, we can view the Test Results and Press ‘Close’.

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

36

Designing Data Model using Model Design Accelerator

|

http://learncognosreports.wordpress.com

37

Sign up to vote on this title
UsefulNot useful