Presentation is loading. Please wait.

Presentation is loading. Please wait.

DO NOT COPY --CONFIDENTIAL Homework 5 Partial Key Star Diagrams & Data Warehouse Design BCIS 4660 Dr. Nick Evangelopoulos Spring 2012.

Similar presentations


Presentation on theme: "DO NOT COPY --CONFIDENTIAL Homework 5 Partial Key Star Diagrams & Data Warehouse Design BCIS 4660 Dr. Nick Evangelopoulos Spring 2012."— Presentation transcript:

1 DO NOT COPY --CONFIDENTIAL Homework 5 Partial Key Star Diagrams & Data Warehouse Design BCIS 4660 Dr. Nick Evangelopoulos Spring 2012

2 DO NOT COPY --CONFIDENTIAL Premier Products – Original Design

3 DO NOT COPY --CONFIDENTIAL Premier Products Initial Star Diagram

4 DO NOT COPY --CONFIDENTIAL PP -- Relation List Fact Table OrderDetail[OrderNum, PartNum, OrderDate, CustNo, RepNo, NumOrdered, Price] Dimension Tables Customer[CustNum, CustName, Street, City, State, Zip, Balance, CreditLimit] Rep[RepNum, LastName, FirstName, Street, City, State, Zip, Commission, Rate] Part[PartNum, Desc, OnHand, Class, Warehouse, Price] Time[TimeKey, Day_of_Week, Month, Year, JulianDate, Quarter, etc.]

5 DO NOT COPY --CONFIDENTIAL Design considerations for the Star schema 1.Put together a set of questions your star design is going to address 2.Create an appropriate Time dimension 3.Chose a Grain: Orders or Orderline? Let’s go for Orderline level, to include info on Parts 4.Handle Slowly Changing dimensions: Create new primary keys for the dimensions tables, called CustomerKey, RepKey, PartKey 5.Handle Frequently Changing dimensions: Customer Account, Rep Compensation, could become minidimensions 6.Identify Fully Additive measures and include them into the fact table: Balance can go to the fact table as a semi-additive measure 7.Identify which concatenation of foreign keys from dimension should make up the primary key of the fact table

6 DO NOT COPY --CONFIDENTIAL Some problems with our Initial Star design How will we handle Slowly Changing dimensions? Address-type of attributes may change slowly. Need for new primary keys on the dimension tables Where will Customer balance be recorded? Another star? What about Part OnHand quantities? Another star?

7 DO NOT COPY --CONFIDENTIAL Premier Products Modified Star Diagram

8 DO NOT COPY --CONFIDENTIAL PP -- Relation List You now need to modify your relation list accordingly

9 DO NOT COPY --CONFIDENTIAL Questions we can answer with this Star Schema Q1: What are the most ordered parts? –Need to provide a list of all orders, group them by PartNum, sum NumOrdered quantities, then sort them by descending quantity count. –This can be accomplished with a query on the fact table.

10 DO NOT COPY --CONFIDENTIAL Questions we can answer with this Star Schema Q2: What is the average number of orders by day of the week? –Need to provide a list of all orders, group them by OrderDate, count distinct OrderNum occurences, then group them by Day_of_week, average the order counts, then sort them by ascending day of the week. –This can be accomplished with a query on the fact table.

11 DO NOT COPY --CONFIDENTIAL Questions we can answer with this Star Schema Q3: Which parts generate the largest revenue? –Need to add an OrderDollars attribute to the fact table, so that revenue by part doesn’t have to be derived. –OrderDollars = NumOrdered * QuotedPrice –Now we can list all orders with their OrderDollars, group them by PartNum, then sum OrderDollars to get total revenue by part, finally sort by descending order of total revenue.

12 DO NOT COPY --CONFIDENTIAL Questions we can answer with this Star Schema Q4: What is the average monthly Rep revenue by each commission rate level? Q5: What Reps have shown an increased monthly revenue since January? Q6: What was the total revenue generated in the last year by each customer? –All these questions can be facilitated by adding an OrderDollars attribute to the fact table.

13 DO NOT COPY --CONFIDENTIAL How to “fake” the Star design in Access (HW5) Create a new Table in Design view, containing all the attributes we need for our star schema. Specify the primary key. Name it OrderDetail.

14 DO NOT COPY --CONFIDENTIAL How to “fake” the Star design in Access (HW5) Open Customer table and DELETE ALL ROWS. Then open it in design view. Add an attribute called CustomerKey and designate it as the primary key. Delete Balance attribute. Repeat similar steps for the Part table. Delete the OnHand attribute. Similarly for Rep.

15 DO NOT COPY --CONFIDENTIAL How to “fake” the Star design in Access (HW5) Create a Time table in Excel. Cover year 2013, Jan1, 2013, to Dec 31, 2013 (posted on the Web). Import it in Access. Make Time_key the primary key

16 DO NOT COPY --CONFIDENTIAL How to “fake” the Star design in Access (HW5) You are now ready to finish your star schema by adding relationships between these empty tables!

17 DO NOT COPY --CONFIDENTIAL Premier Products Final Star Diagram


Download ppt "DO NOT COPY --CONFIDENTIAL Homework 5 Partial Key Star Diagrams & Data Warehouse Design BCIS 4660 Dr. Nick Evangelopoulos Spring 2012."

Similar presentations


Ads by Google