Databases Reference
In-Depth Information
SALE
Salesperson
Produc t
Time Perio d
Numbe r
Number
Numbe r
Quantity
1
137
16386
001
57
2
137
24013
001
129
3
137
16386
002
24
4
137
24013
002
30
5
137
16386
102
85
6
137
24013
102
36
7
204
16386
102
111
8
204
24013
102
44
9
137
16386
103
47
10
137
24013
103
59
11
204
16386
103
13
12
204
24013
103
106
13
137
16386
331
63
14
137
24013
331
30
15
186
16386
331
25
16
186
24013
331
16
17
204
16386
331
44
18
204
24013
331
107
F IGURE 13.7 (Continued)
General Hardware Company data
warehouse sample data
19
361
16386
331
18
20
361
24013
331
59
Good Reading Bookstores Data Warehouse
Does Good Reading Bookstores need a data warehouse? Actually, this is a very
good question, the answer to which is going to demonstrate a couple of important
points about data warehouses. At first glance, the answer to the question seems to
be: maybe not! After all, the sales data in Good Reading's transactional database
already carries a date attribute , as shown in the SALE table of Figure 5.16. Thus,
it looks like Good Reading's transactional database is already historical! But Good
Reading does need a data warehouse for two reasons. One is that, while Good
Reading's transactional database performs acceptably with perhaps the last couple
of months of data in it, its performance would become unacceptable if we tried
to keep ten years of data in it. The other reason is that the kinds of management
decision making that require long-term historical sales data do not require daily data.
Data aggregated to the week level is just fine for Good Reading's decision making
purposes and storing the data on a weekly basis saves a lot of time over retrieving
and adding up much more data to answer every query on data stored at the day level.
Figure 13.8 shows the Good Reading Bookstores data warehouse star schema
design. The fact table is SALE and each of its records indicates how many of a
particular book a particular customer bought in a particular week (here again week is
the lowest-level time period) and the price that the customer paid per book. For this
 
Search WWH ::




Custom Search