Chapter Eight – Big Data, Data Warehouses and Business Intelligence Systems
N. Heather Sweeney is interested in the effects of payment type on sales in dollars.
1. Modify the design of the HSD-DW dimensional database to include a
PAYMENT_TYPE dimension table.
See the file: DBC-e08-HSD-DW-Create-PAYMENT-TYPE.sql
The HSD database INVOICE table includes a PaymentType column. Current values are VISA and
MasterCard. We will also allow for American Express, Check, and Cash. We will add the following
PAYMENT_TYPE dimension table to the HSD-DW database:
2. Modify the HSD-DW database to include the PAYMENT_TYPE
dimension table.
We will also need to modify the PRODUCT_SALES fact table by adding a PaymentTypeID column
and a foreign key constraint. This column will first be set to NULL, but after it is populated, it will
have to be reset to NOT NULL
See the database diagram on the next page.
3. What data will be used to load the PAYMENT_TYPE dimension table?
What data will be used to load foreign key data into the
PRODUCT_SALES fact table? Write the complete set of SQL statements
necessary to load these data.
See the file: DBC-e08-HSD-DW-Insert-Data-PAYMENT-TYPE.sql