Top Banner
1 ORDER MANAGEMENT Chapter 5
60

Data warehouse : Order Management

May 12, 2015

Download

Education

Data warehouse : Order Management
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Data warehouse : Order Management

1

ORDER MANAGEMENT

Chapter 5

Page 2: Data warehouse : Order Management

Agenda

� Introduction to Order Management

� Order Transactions

2

� Order Transactions

� Invoice Transactions

� Accumulating Snapshot for the Order Fulfillment Pipeline

� Fact Table Comparison

� Implementing

� In the Real World� In the Real World

� Techniques

� Summary

Page 3: Data warehouse : Order Management

Introduction to Order Management

� Order management comprised of a series of

business process

3

business process

� A subset of the data warehouse bus matrix

Page 4: Data warehouse : Order Management

Order Transactions4 Order Transactions

Page 5: Data warehouse : Order Management

Order Transactions

� The natural granularity for an order transaction fact

table is one row for each line item on an order.

5

table is one row for each line item on an order.

� Example of result schema

Page 6: Data warehouse : Order Management

Order Transactions

� Fact Normalization

� Dimension Role-Playing

6

� Dimension Role-Playing

� Product Dimension Revisited

� Customer Ship-To Dimension

� Deal Dimension

� Degenerate Dimension for Order Number

� Junk Dimensions� Junk Dimensions

� Multiple Currencies

� Header and Line Item Facts with Different Granularity

Page 7: Data warehouse : Order Management

Fact Normalization

� Fact Normalization : A single, generic fact amount,

along with a dimension that identifies the type of

7

along with a dimension that identifies the type of

fact

� Use Fact Normalization when

� Set of facts is sparsely populated for a given fact row.

� No computations are made between facts.

We generally resist the urge to further normalize � We generally resist the urge to further normalize

the fact table

Page 8: Data warehouse : Order Management

Dimension Role-Playing

� Role-Playing : occurs when a single dimension

simultaneously appears several times in the same

8

simultaneously appears several times in the same

fact table.

� Date dimension is found in every fact table because

we are always looking at performance over time.

Page 9: Data warehouse : Order Management

Dimension Role-Playing

� Example of Role-playing

9

Time Time

Request

Date

Request

Date

Order

Date

Order

Date

Assembly

Date

Assembly

Date

Time Dimension

Time Dimension

Ship

Date

Ship

Date

Arrival

Date

Arrival

Date

Page 10: Data warehouse : Order Management

Product Dimension Revisited

� Product dimension describes the complete portfolio of products sold by a company.

10

products sold by a company.

� Characteristics of Product dimension

1. Numerous verbose descriptive columns.

2. One or more attribute hierarchies in addition to many nonhierarchical attributes.

3. Add readable text strings to augment or replace numeric codes in the operational product master.codes in the operational product master.

4. Quality assure all the text strings to ensure that there are no misspellings, impossible values, or cosmetically different versions of the same attribute.

5. Document the product attribute definitions, interpretations, and origins in the data warehouse’s metadata.

Page 11: Data warehouse : Order Management

Customer Ship-To Dimension

� The customer ship-to dimension contains one row for

each discrete location to which we ship a product.

11

each discrete location to which we ship a product.

� Common hierarchy is natural geographic,

customer’s organizational.

Country

Region

Bill’s number

Customer NameRegion

Province

Address

Customer Name

Customer Organization Name

Customer Corporate Parent Name

Page 12: Data warehouse : Order Management

Customer Ship-To Dimension

� Factors must be taken into consideration:

1. The one-to-one or many-to-one relationship may turn

12

1. The one-to-one or many-to-one relationship may turn

out to be a many-to-many relationship.

2. If the relationship between sales rep and customer

ship-to varies over time then the combined dimension

is in reality some kind of fact table itself!

3. If the sales rep and customer ship-to dimensions 3. If the sales rep and customer ship-to dimensions

participate independently in other business process

fact tables, we’d likely keep the dimensions separate.

Page 13: Data warehouse : Order Management

Customer Ship-To Dimension

� Example of Customer Ship-To Dimension

13

Page 14: Data warehouse : Order Management

Deal Dimension

� Deal dimension describes the incentives that have

been offered to the customer that theoretically

14

been offered to the customer that theoretically

affect the customers’ desire to purchase products.

� Deal dimension describes

� the full combination of terms

� Allowance

Incentives� Incentives

Page 15: Data warehouse : Order Management

Deal Dimension

� Deal Dimension Design

1. If the terms, allowances, and incentives are

15

1. If the terms, allowances, and incentives are correlated, then package them into a single deal dimension.

2. If the terms, allowances, and incentives are quite uncorrelated, then split such a deal dimension into its separate components.

3. In a very large fact table, the desire to reduce the 3. In a very large fact table, the desire to reduce the number of keys in the fact table composite key would favor keeping the deal dimension as a single dimension.

Page 16: Data warehouse : Order Management

Deal Dimension

� Example of Deal Dimension

16

Page 17: Data warehouse : Order Management

Degenerate Dimension

for Order Number

� Degenerate dimensions typically are reserved for

operational transaction identifiers.

17

operational transaction identifiers.

� Each line item row in the orders fact table includes

the order number as a degenerate dimension.

� Useful of Degenerate Dimension for Order Number

� allows us to group the separate line items on the order.

� enables us to answer such questions as the average

number of line items on an order.

� is used occasionally to link the data warehouse back to

the operational world.

Page 18: Data warehouse : Order Management

Junk Dimension

� Why have junk dimension

� Leave flags and indicators unchanged in the fact table

18

� Leave flags and indicators unchanged in the fact table

row

� Make each flag, indicator into its own separate

dimension.

� Strip out all the flags and indicators from the design.

� A junk dimension is a convenient grouping of � A junk dimension is a convenient grouping of

typically low-cardinality flags and indicators.

Page 19: Data warehouse : Order Management

Junk Dimension

� Sample rows of an order indicator junk dimension

19

Page 20: Data warehouse : Order Management

Multiple Currencies

� Multiple Currencies : Expressed in both local

currency and the standardized corporate currency.

20

currency and the standardized corporate currency.

� The conversion rate table contains all combinations

of effective currency exchange rates going in both

directions.

Page 21: Data warehouse : Order Management

Multiple Currencies

� Track multiple currencies with a daily currency

exchange fact table.

21

exchange fact table.

Page 22: Data warehouse : Order Management

Header and Line Item Facts with

Different Granularity

� Shouldn’t mix fact granularities (for example, order and order line facts) within a single fact table.

22

and order line facts) within a single fact table.

� Allocating header facts to the line item.

Page 23: Data warehouse : Order Management

Invoice Transactions23 Invoice Transactions

Page 24: Data warehouse : Order Management

Invoice Transactions

� Occurs when products are shipped from our facility

to the customer

24

to the customer

� Each items corresponding to a product being

shipped

� Various prices, discounts, and allowances are

associated with each line item

Page 25: Data warehouse : Order Management

Invoice Transactions25

Page 26: Data warehouse : Order Management

Invoice Transactions

� From invoice fact table we can see …

� All company’s products

26

� All company’s products

� All customers

� All contract and deals

� All off-invoice discounts and allowances

� All revenue

All variable and fixed costs (manufacturing, delivering)� All variable and fixed costs (manufacturing, delivering)

� All money left over after delivery of product

� Customer satisfaction metrics

The optimal place to start a DW

Page 27: Data warehouse : Order Management

Accumulating Snapshot27

for the Order Fulfillment Pipeline

Accumulating Snapshot

Page 28: Data warehouse : Order Management

Accumulating Snapshot for

the Order Fulfillment Pipeline

� Useful when we want to better understand how

quickly products move through pipeline

28

quickly products move through pipeline

Order Fulfillment Pipeline Diagram

Page 29: Data warehouse : Order Management

Accumulating Snapshot for

the Order Fulfillment Pipeline29

Page 30: Data warehouse : Order Management

Accumulating Snapshot for

the Order Fulfillment Pipeline30

Page 31: Data warehouse : Order Management

Accumulating Snapshot for

the Order Fulfillment Pipeline

� Typically have multiple dates representing major

milestones of the process

31

milestones of the process

� Useful when the products moving through the

pipeline is uniquely identified

� Electronics equipment with a serial number

� Automobile with a vehicle ID number

Fits most naturally with short-lived processes� Fits most naturally with short-lived processes

� Lag calculations

Page 32: Data warehouse : Order Management

Fact Table Comparison32 Fact Table Comparison

Page 33: Data warehouse : Order Management

Fact Table Comparison33

Page 34: Data warehouse : Order Management

Designing Real-Time Partitions34 Designing Real-Time Partitions

Page 35: Data warehouse : Order Management

Designing Real-Time Partitions

� DW extend its existing historical time series

seamlessly to the current instant

35

seamlessly to the current instant

� Separated physically and administratively from the

conventional static DW tables

� Requirements

� Contain all the activity occurred since the last update

� Link as seamlessly as possible to the grain and content

� Be so lightly indexed that incoming data can be

continuously dribbled in

Page 36: Data warehouse : Order Management

Implementing36 Implementing

Page 37: Data warehouse : Order Management

Business Process37

� Order management process : ก�����ก���� ��� ���������������������� ������ก������ ��� �!�����"��������������� ������ก������ ��� �!�����"�� ก�����#��� ��������

� ก�����ก�������

� ก��$�!������

Page 38: Data warehouse : Order Management

Business Process (�!�)38

� �'�������(���!����!��)� �����$��� ���*���!��������������!��) $�ก������������� �����$��� ���*���!��������������!��) $�ก������������

� �������ก����� ���������������������ก������ �����$��$������ก���������ก�������ก�������

� $�ก���$�$�!�+,�-.ก���/!���������� ��$�$�!�+,��"���"����!���� 0�!��$�"ก��!�,-�����(��

� ����������!�� ก������-"������"�$����������-���"��+�����-1����!���� � ����������!�� ก������-"������"�$����������-���"��+�����-1����!���� (�!���������-���"��+����������0�!-�*���

Page 39: Data warehouse : Order Management

Fact Table39

� Invoice Fact

Order Fact� Order Fact

� Order Fulfillment Accumulating Fact

� Order Line Item Fact

� Parts Ordering Fact

� Conversion Fact� Conversion Fact

Page 40: Data warehouse : Order Management

Cube40

� Invoice

Order� Order

� Order Line Item

� Parts Ordering

Page 41: Data warehouse : Order Management

In the Real World41 In the Real World

Page 42: Data warehouse : Order Management

DELL Data Warehouse42

� DELL Data Warehouse(DDW) is a global information management system that stores data pulled directly from Dell’s Regional Order Management and Service management system that stores data pulled directly from Dell’s Regional Order Management and Service Systems.� Order Data is available for the US, Latin America, Canada,

Europe, Asia Pacific and Japan. It’s upload daily with the previous day’s activity.

� of the order in the order lifecycle. The DW provides information for all order statuses and order types to the item level.information for all order statuses and order types to the item level.

� Order Status indicates the position

� Order Type indicates how revenue and cost associated with the order will be treated for accounting purposes.

Page 43: Data warehouse : Order Management

Dell – Lifecycle of an Order43

� Every order at Dell goes through the following

stages shown below :stages shown below :

Page 44: Data warehouse : Order Management

Techniques44 Techniques

Page 45: Data warehouse : Order Management

ก�� Join ��!���!��

� ก�� Join ��������#�(���!�� ��(�!������"�� SQL ���(��

45

��(�!������"�� SQL ���(��

� +*�����������*��� Merge Join

� ��2"+*�� ������"������.-�����������"�$�

�� Join ก������-����"�$�+*� Join ก!��Join ก!��

� $�ก����������3ก#�,��(���-��!�$�+,��"��+���4� Join Key 0-������-���+���4�������'�

Page 46: Data warehouse : Order Management

ก�� Join ��!���!�� (�!�)46

Page 47: Data warehouse : Order Management

ก�� Join ��!���!�� (�!�)47

Page 48: Data warehouse : Order Management

ก����"�� Script Generator #�,�� Time

Dimension ����5��� C#

� �������� �*��+�ก������"0-����������� �������������'ก��(��

48

������ �������������'ก��(��+� Time Dimension (3��$�(�!�"����.-�����+� Fact

Table ก1���)

� +*����������� Script

Generator (���+*�0-��+�Generator (���+*�0-��+�0-1�0�ก))

Page 49: Data warehouse : Order Management

ก����"�� Script Generator #�,�� Time

Dimension ����5��� C# (�!�)49

� #�,��5��� C# +,��#����"�� ����(�ก#�,��*�����0��������'� �*!� dates� ����(�ก#�,��*�����0��������'� �*!� dates

� �� datesBuffer.AddRow() ก!��

� $�ก���ก#�,���!�+,�0���������� ก1$��#�����.-+!�����+,��-�

Page 50: Data warehouse : Order Management

ก����"�� Script Generator #�,�� Time

Dimension ����5��� C# (�!�)50

Page 51: Data warehouse : Order Management

ก����"�� Script Generator #�,�� Time

Dimension ����5��� C# (�!�)51

DateTime StartDate = new DateTime(2009, 6, 1);DateTime EndDate = DateTime.Now;DateTime EndDate = DateTime.Now;DateTime RunningDate = StartDate;

while (RunningDate <= EndDate) {DatesBuffer.AddRow();DatesBuffer.TheDate = RunningDate;DatesBuffer.DateOfMonth = RunningDate.Day;DatesBuffer.Month = RunningDate.Month;DatesBuffer.Quarter = RunningDate.Month / 4 + 1;DatesBuffer.Year = RunningDate.Year;DatesBuffer.Year = RunningDate.Year;RunningDate = RunningDate.AddDays(1);

}

Page 52: Data warehouse : Order Management

ก��������������!���!��52

� +*� ��0ก�� SQL Server 2008 Report Builder 2.0

� ����� ,-�(��6�"$�ก��1�( �����(� �� �6��� ����� ,-�(��6�"$�ก��1�( �����(� �� �6��

� ,-�$�ก����(6-�������0-�� /.�+*�����3-�ก67-���"�����ก�������ก����4������,���ก��6(�� +�-ก�8���"��ก�ก������ Cube

Page 53: Data warehouse : Order Management

ก��������������!���!�� (�!�)53

Page 54: Data warehouse : Order Management

Summary54 Summary

Page 55: Data warehouse : Order Management

Summary

� Context of the order management process

Dimension role-playing

55

� Dimension role-playing

� Multiple currencies

� Common challenges in modeling orders data

Page 56: Data warehouse : Order Management

Summary

� Facts at different levels if granularity

Set of facts associated with invoice transactions

56

� Set of facts associated with invoice transactions

� Power of accumulating snapshot fact tables

� Differences between the three fundamental types

of fact tables

� Designing Real-Time Partitions� Designing Real-Time Partitions

Page 57: Data warehouse : Order Management

Members

� 49050867 �����ก@���� 0�������*

49050917 ���$� �$ ���������

57

� 49050917 ���$� �$ ���������

� 49050925 ����$�C�ก���� 0�����

� 49051154 ���5��� ����D����E

� 49051162 ���5�� 5.!�"

Page 58: Data warehouse : Order Management

ก�����ก���#����58

1. F�ก���GH,� 0-������,��"��ก"�������2. ���*'� ��ก0�� Business Process I������.- OLTP2. ���*'� ��ก0�� Business Process I������.- OLTP

3. ���*'� ��ก0�� Dimension 0-� Fact Table

4. ���"������.-+,�I������.- OLTP

5. ����I������.- OLTP 6. ���� Dimension Table

7. ���� Fact Table

���� Cube 8. ���� Cube 9. ,�����.-�������"��ก"�������10. �#� Slide Presentation

Page 59: Data warehouse : Order Management

ก��0�!�,����"�59

F�ก���GH,� 0-������,��"��ก"�������

���*'� ��ก0�� Business Process I������.- OLTP���*'� ��ก0�� Business Process I������.- OLTP

���*'� ��ก0�� Dimension 0-� Fact Table

���"������.-+,�I������.- OLTP

���� Dimension Table

,-� Fact Table

���� Fact Table

���� Dimension

���� Dimension Table

,-� Dimension

,-� Dimension Table

,-� Dimension Table

,�����.-�������"��ก"�������

$� �$ �$�C�ก���� 5��� 5�� ก@����

,-� Fact Table

���� Cube

���� Dimension Table

,-� Dimension Table

,-� Fact Table

�#� Slide Presentation

�ก"�������

�#� Slide Presentation

Page 60: Data warehouse : Order Management

Questions and Answers60 Questions and Answers