IS466 Decision Support Systems Instructor: Dr. Mourad Ykhlef Lecturer: Yazeed Alabdulkarim SQL Server Business Intelligence Development Studio 2008 User Guide Yazeed Alabdulkarim Revised by: Dr. Mourad Ykhlef
SQL Server Business Intelligence Development Studio 2008 User Guide In this User Guide you will learn how to do the following tasks by SQL Server Business Intelligence Development Studio 2008: 1. Create Analysis Services Project. 2. Create Data Source. 3. Create Data View. 4. Create Dimension and Hierarchy. 4.1. Create Dimension. 4.2. Create Hierarchy within a Dimension. 5. Create Cube. 1
1. Create Analysis Services Project. A- Open SQL Server Business Intelligence Development Studio Click Start -> All Programs -> Microsoft SQL Server 2008 -> SQL Server Business Intelligence Development Studio. B- Click File -> New Project. 2
C- Select Analysis Service Project and type the Project Name then click OK. D- Click on Solution Explorer tab to view the project components. 3
E- Right click on the Project Name in the Solution Explorer, then click on Properties. F- Click on Deployment and be sure that the Server field contains localhost/[your SQL Server Instance Name]. 4
2. Create Data Source. A- Right click on Data Sources in the Solution Explorer, then click on New Data Source. B- Click New button to create data connection. 5
C- Click on Providers and Select Microsoft Office 12.0 Access Database Engine OLE DB Provider and click OK. D- On the Server or file name field enter your access database full path and then click on Test Connection button to assure that it is correct. 6
E- Click on OK button of the Test Connection and click on OK button again to finish the creating of the data connection. F- Click on Next > G- Select Use the service account and then click on Next >. 7
H- Enter a name for the data source in the Data source name field and click on Finish button, after that you will be able to see your newly created data source under Data Sources in the Solution Explorer. 8
3. Create Data Source View. A- Right click on Data Source Views in the Solution Explorer, then click on New Data Source View. B- Click on Next > button after making sure that the desired data source is selected. 9
C- Select the Fact Table and all the Dimensions Tables and then click on Next > button. D- Enter a name for the data source view in the Name field and click on Finish button, after that you will be able to see your newly created data source view under Data Sources Views in the Solution Explorer. Note: You have to check the data source view to make sure that all the relationships between the tables are exist, and if some of them aren t exist you need to create them in the view. 10
4. Create Dimension and Hierarchy. 4.1. Create Dimension. A- Right click on Dimensions in the Solution Explorer, then click on New Data Dimension. B- Click on Next > button. 11
C- On the following form you will specify 4 things: - Desired Data source view. - Main table of the dimension which is the table. that has a direct relation with the Fact Table. - Key columns which are the primary key columns of the table. - Name column (this name column will be viewed when selecting the key columns which is useful because it gives meaning to the selected data). Then click on Next > button. 12
D- In the following form you will see the related tables (if any) to that main table of the dimension, then click on Next > button. E- Select the attributes of the main table and the tables related to it which you want them to be avilable under the dimension for selecting and browsing them.normally the ID attributes will be checked automatically, a good way that you keep them checked, then add the name attributes of the ID columns and any attribute you think you will need to browse it graphically or using queries. Then click on Next > button. 13
E- Enter the name of the dimension in the Name field and then click on Finish button, after that you will be able to see your newly created Dimension under Dimensions in the Solution Explorer. By the same way, you need to create the other 2 dimensions of the Product data source (Employee and State dimensions). 14
4 Create Dimension and Hierarchy. 4.2. Create Hierarchy within a Dimension. Creating hierarchy will enable you to see the dimension hierarchy as one component which is better for understanding, also it will help you when browsing the data of the dimension because rather than dragging and dropping all hierarchy attributes of the dimension you will drag and drop only one component. We will create the following hierarchy of the Product Dimension: Product -> Product Subcategory -> Category. A- On the Solution Explorer right click on the Product dimension under Dimensions and click Open. 15
B- Click on Attribute Relationships tab and you will see the following: C- Click on Dimension Structure tab, in the Hierarchies view we will drag and drop the attributes of the hierarchy. 16
D- Drag the 1 st attribute of our hierarchy Category ID attribute (the first attribute of the hierarchy is the last attribute in the diagram under Attribute Relationships tab because it is the most general one) and drop it in the Hierarchies view. E- Drag the 2 nd attribute of our hierarchy Sub Category ID attribute and drop it in the Hierarchies view under the 1 st attribute. 17
F- Drag the final attribute of our hierarchy Product ID attribute and drop it in the Hierarchies view under the 2 nd attribute. Notes: 1- The attributes which selected to be in the hierarchy is according to the diagram under the Attribute Relationships tab. 2- While creating the hierarch it is preferred that each level (attribute) of the hierarchy has an attribute relationship from the attribute under it directed to it ( you can view and create the attribute relationships under Attributes Relationships tab). a- Selecting the attributes which don t satisfy the previous condition isn t the best practice because it will decrease the performance and due to that a warning will be raised. b- Selecting the attributes which satisfy the previous condition will not decrease the performance because each level (attribute) of the hierarchy has an attribute relationship from the attribute under it directed to it as we have seen in the Attributes Relationships tab. 18
G- To rename the Hierarchy right click on the hierarchy header and click on rename, then type Product Hierarchy as a name to the hierarchy. H- On the Solution Explorer right click on the Product dimension under Dimensions and click Process. 19
I- Click on Run button. J- Click on Close button. 20
K- Click on Close Button. L- Click on Browser tab (you can do this also by right clicking on the Product dimension then clicking on Browse), then select the Hierarchy you want browse after that you can drill down or roll up in the hierarchy. 21
5. Create Cube. A- Right click on Cubes in the Solution Explorer, then click on New Cube. B- Click on Next > button. 22
C- After making sure that the desirable data source view is selected, check the Measure(Fact) table, then click on Next > button. D- Check the required measures, we will check only the Sales Dollars measure, then click on Next > button. 23
E- After checking that all the required dimensions are selected, click on Next > button. F- Enter name for the cube in the Cube name field, then click on Finish button. 24
G- On the Solution Explorer right click on the ProductSales cube under Cubes and click on Process. H- Click on Run button. 25
I- Click on Close button. J- Click on Close button. 26
K- Click on Browser tab to browse the cub (you can do this also by right clicking on the ProductSales cube then clicking on Browse). L- First, drag and drop the Sales Dollars measure. 27
M- Drag and drop all the dimensions, then you will be able drill down, rollup or slice through them. 28