Lec4 DM
Lec4 DM
Scenario
ABC is a company with four branches at x1,
x2, x3 and x4. The Sales Manager wants quarterly sales report. Each branch has a separate operational system.
Scenario 1 : ABC
x1
x2
Sales Manager
x4
Solution1 :ABC
Extract sales information from each database. Store the information in a common repository at a single site.
Solution1 :ABC
x1
x4
Solution 2
Data Entry Operator Report
Transaction
Operational database
Extract data
Data Warehouse
Manager
Example
1. Data selection
Cust-_id
101104 101105 101102
Cust_name
Ali moh Yasir musa
Mhd ali ahmed
Adress
bahri alsahafa
date
1-4-2009 1-1-1 28-2-2008
soba
karari
ombada soba
101115
101034 101244
1-1-1
2-2-2009 20-4-2009
2- Data Cleaning
De-duplication Lack of Domain Consistency
Cust_id
101104 101105 101102
B_date
1-4-1978
salary
Owns acar
Have ahouse
100000
30000
5300
2-3-1980
7-8-1987
no yes no
yes yes no
Add data to DB
Cust -_id
Cust_ name
Adres s
bahri
date
balanc e
100000
B_dat e
1-4-1978
salary
Owns acar
no
1-4-2009
3000
goansport
101105
101102 101115 101034 101244
Yasir 30000 alsahafa 1-1-1 musa Mhd ali 5300 soba 28-2-2008 ahmed Ali mhd karari null 1-1-1 adam Eltayeb ombada 2-2-2009 null hassan Mhd ali soba 20-4-2009 5300 ahmd
2-3-1980
7-8-1987 null null 7-8-1987
1000
500 null null 500
yes
no null null no
yes
no null null no
sadaalahdas
alintibaha goansport
alintibaha
altayar
Cust -_id
Cust_ name
Adres s
bahri
date
balanc e
100000
B_dat e
1-4-1978
salary
Owns acar
no
1-4-2009
3000
goansport
Yasir musa Mhd ali 101102 ahmed Mhd ali 101244 ahmd 101105
alsahafa
soba soba
1-1-1
28-2-2008 20-4-2009
30000
5300 5300
2-3-1980
7-8-1987 7-8-1987
1000
500 500
yes
no no
yes
no no
sadaalahdas
alintibaha altayar
Cust_id
101104 101105 101102 101244
salary
Owns acar
0 1 0 0
100
34 32 25 25
3 1 ,5 ,5
goansport
30
5,3 5,3
sadaalahdas
alintibaha altayar
Flattening
bala nce
B_da salar Own Have altay alinti sada goansport te y s ahou ar baha alah acar se das
34
32 25
100 30 5,3
3
1 ,5
0
1 0
1
1 0
0
1 0
0
0 1
0
0 0
1 0 0 0
5,3
25
,5
Case Study
Afco Foods & Beverages is a new company which produces dairy,bread and meat products with production unit located at soba There products are sold in khartoum ,khartoum bahri and omdurman They have sales units at khartoum north, khartoum west , omdurman ,bahri and soba. The President of the company wants sales information.
Sales Information
Report: The number of units sold.
113
January
February
March
April
14
41
33
25
Sales Information
Report : The number of items sold for each product with time
Jan Feb Mar Apr Wheat Bread Cheese Burger 6 8 16 25 6 6 21
Product
17 8
Sales Information
Report: The number of items sold in each City for each product with time
Jan khartou m Wheat Bread Feb Mar 3 Apr 10
Cheese
Burger bahri Wheat Bread Cheese Burger
3
4
16
16
6
6 3 7 8
Product Time
3 4 9 15
Sales Information
Report: The number of items sold and income in each region for each product with time.
Jan $ U Feb $ U Mar $ U Apr $ U
KH
Wheat Bread
Cheese Burger 7.95 7.32 3 4 42.40 29.98 16 16
7.44
15.90 10.98
3
6 6
24.80
10
BAHRI
Wheat Bread
Cheese Burger 7.95 7.32 3 4 16.47 9
7.44
17.36
21.20
7
8
27.45
15
bahri
bahri khartoum
3
4 16
7.95
7.32 42.40
2
2 1
589
1218 589
1/1/1998
1/1/1998 2/1/1998
3
4 16
7.95
7.32 42.40
bahri
Khartoum bahri
sudan
Sales Fact
Product
Product Category
Region
OLAP Cube
City All Mumbai Mumbai Mumbai Mumbai Mumbai Product All All White Bread Time All All All Units 113 64 38 13 3 3 Dollars 251.26 146.07 98.49 32.24 7.44 7.44