DESB, University of Utah

Total Page:16

File Type:pdf, Size:1020Kb

DESB, University of Utah

DESB, University of Utah ACCTG 6910, Spring 2003 Project Milestone 2 (Feb 11 - Feb 18, 2003)

The SYA.COM data warehouse development team in e.bis has assigned you to start creating the data warehouse using the design it has so far. Use Oracle Data Mart Designer to draw the following dimensional model and generate the corresponding empty tables. To submit your answer, please send an email to [email protected] with exactly the following content by 9 am of February 18:

Student name: Name of the Application System that contains the dimensional model: Name of star schema diagram: Names of the empty data warehouse tables:

CUSTOMER SESSION # CUSTOMER_KEY # SESSION_KEY ref * CID * SESSION_ID * NAME * LOGIN_IP_ADDRESS * GENDER * CITY * STATE SALESFACT ref * COUNTRY * QUANTITY * INCOME_LEVEL ref * UNIT_PRICE ref * EDUCATION_LEVEL * SALES_AMT * INTERNET_USAGE ref ref

LOGIN_TIME # LOGIN_TIME_KEY ref ref * LOGIN_TIME * DAY_OF_WEEK PRODUCT * DAY_OF_MONTH # PRODUCT_KEY * MONTH_NUMBER * PID * QUARTER_NUMBER * PNAME * YEAR_NUMBER * PCNAME

1 Instructions: 1. Open oracle data mart designer, Start -> Programs -> Data Mart Designer R2.1 -> Data Mart Designer

2. Key in your user name and password in the following screen. The connect string should be dmdb.

3. When you see the following window, you can key in the name of the application system, e.g. DEMO, then click the Create button.

2 4. Click OK in the window you see next as follows.

5. After you log in the system you will see the window as follows. Click on the Entity Relationship Diagrammer to start drawing the schema table by table.

3 6. Now you should see the main window of designer, click the New Diagram icon.

7. A child window is opened for you to draw a star schema.

4 8. First, we draw the dimension tables. We begin with drawing SESSION table. Please click on the Entity icon, then drag it to and drop it at the point at which you want to put your SESSION dimension.

9. Now, you should see a dialog box as follow. You can type in the dimension table name: SESSION and click OK button to continue.

10. An entity box is created for the SESSION dimension. You can drag its surrounding points to enlarge the box.

5 11. Please double click the box, and click the tab “Attributes”, now you can see the windows as follow. Type in the attribute information in following screen snapshot. Click on the OK button when you are done.

12. Please follow the same procedure to continue to draw the other three dimension tables and input the attribute information given as below.

6 7 13. Please follow the same procedure to continue to draw fact table and input the attribute information given as below. (Notice: you only need to input the attributes for measurement, the designer will generate the primary keys for the fact table automatically).

8 14. Now, we should see a diagram as follow, and we are going to build the relationships between dimension and fact tables.

15. To the relationship between SESSION and SALESFACT, click on the m:0 relationship icon next to the entity icon. Move the mouse onto SALESFACT table and left-mouse-button click once. Drag the mouse onto the SESSION table, and left-mouse-button click again to open the following dialog box.

9 16. Please enter relationship names. In above example, we just enter ref (reference) for from and to name. After you confirm your input, the relationship between SESSION and SALESFACT should be presented as follow:

SESSION # SESSION_KEY * SESSION_ID ref * LOGIN_IP_ADDRESS SALESFACT * QUANTITY * UNIT_PRICE ref * SALES_AMT

10 17. Please double click on the relationship, you can see a dialog box as below:

18. Check the checkbox labeled as Primary UID for the SALESFACT. This action notifies designer to automatically include in the primary key for fact table the primary key of SESSION. Click on the OK button to confirm your modification. 19. A short line is created near the craw as follows to indicate that SESSION_KEY is a part of primary key of SALES.

SESSION SALESFACT * QUANTITY # SESSION_KEY ref * UNIT_PRICE * SESSION_ID * SALES_AMT * LOGIN_IP_ADDRESS ref

20. Follow the same procedure to build the relationships between PRODUCT, CUSTOMER, LOGIN_TIME and SALESFACT. 21. After that, you can save the diagram in a name of your choice.

11 22. Go back to the screen shown as follow, and click on the Database Design Transformer.

23. In the following dialog box, click on the “Settings” button

12 24. In the settings dialog box, click the tab named “Other Settings”, and uncheck the two check boxes labeled as “Foreign key columns” and “Surrogate key columns”

25. Click on the“Run” button as follows. 26. After running the transformer, you can generate empty table structures corresponding to the star schema. Please click on the Designer Editor in the following window.

27. A dialog box as follow will be popped up. Be sure that the Server Model option is selected, and click OK to continue.

13 14 28. In the following window, you can check the transformation result in the child window named “Server Model – Navigator”.

29. Now, select the Generate -> Generate Database from Server Model in the menu bar in the above window. Then, select the Database option in the following dialog box, and enter your user name, password and connect string (dmdb)

15 30. Click on the “Objects” tab in the above dialog box. Since we need to generate all the transformed objects (dimension and fact tables) into Oracle data mart, we click the button with double arrowheads.

31. Click on the Start button in the screen above. After a while, a dialog box as follows will be presented. Click on the “Execute DDL” button to start generating the tables physically into the data mart.

16 32. To check the star schema that you generate in the data mart, please open SQL Plus by clicking the SQL Plus icon in the following screen, and type the commands: select table_name from user_tables;

desc sessions;

Note: the generated tables will be named as plural form of the original name. For example, the dimension table SESSION will be named as SESSIONS.

17

Recommended publications