Databases Reference
In-Depth Information
Country attribute of the PUBLISHER table, the State and Country attributes of the
CUSTOMER table, and the Quarter and Year attributes of the TIME PERIOD table,
they could find the total number of books published in Brazil that were purchased
by customers in California during the second quarter of 2009.
Lucky Rent-A-Car Data Warehouse
Like Good Reading Bookstores' transactional database, Lucky Rent-A-Car's
transactional database (Figure 5.18) already carries a date attribute (two, in fact) in
its RENTAL table. The reasoning for creating a data warehouse for Lucky is based
on the same argument that we examined for Good Reading, that its transactional
database would bog down under the weight of all the data if we tried to store ten
years or more of rental history data in it. Interestingly, in the Lucky case, the data
warehouse should still store the data down to the day level (resulting in a huge data
warehouse). Why? In the rental car business, it is important to be able to check
historically whether, for example, more cars were rented on Saturdays over a given
time period than on Tuesdays.
Figure 13.9 shows the Lucky Rent-A-Car data warehouse star schema design.
The fact table is RENTAL. In this case, as implied above, the fact table does not
CUSTOMER
Customer
Number
CAR
Customer
Name
Car Serial
Number
RENTAL
Customer
Address
Model
Car Serial
Number
Customer
Telephone
Year
Customer
Number
Class
Rental Date
(Time Period
Number)
TIME PERIOD
Manufacturer
Name
Time Period
Number
MANUFACTURER
Return Date
(Time Period
Number)
Manufacturer
Name
Year
Cost
Manufacturer
Country
Quarter
Sales Rep
Name
Month
Sales Rep
Telephone
Week
Day
F IGURE 13.9
Lucky Rent-A-Car data warehouse star schema design with snowflake feature
 
Search WWH ::




Custom Search