Exercise Beginning Database: A Practical Approach for Non-relational Database.

9.2 Exercise

As a stock manager, Encik Anas who works in Car Appliances Company is responsible to manage all purchases made by the company. He has asked you to develop a small data warehouse application prototype that enables him to produce a report for the top management. Based on the report, the company can study all purchases made by the company in terms of branch, suppliers or car supplies units. Given is the sample data for Purchase table in the company’s database. PURCHASE_ID BRANCH_ID SUPPLIER_ID UNIT_ID PURCHASE_DATE NUM_OF_UNIT 2 MELAKA PROTON ENGINE 10-Jun-88 100 3 KL PROTON FRAME 18-Aug-88 120 4 PERAK NZWHEELS SUSPENSION 10-Mar-88 100 5 KEDAH SME BRAKES 10-Jan-88 300 7 KEDAH TOYOTA COVERBODY 12-Feb-88 255 8 PERAK NAZA SUSPENSION 31-Aug-88 522 9 KL SPAREPRO FRAME 12-Jan-88 411 10 KL NZWHEELS BRAKES 12-Jan-88 611 11 KEDAH PROTON WHEELS 10-Jan-88 125 12 MELAKA SME COVERBODY 10-Jan-88 266 13 KEDAH SPAREPRO COVERBODY 12-Feb-88 78 14 PERAK NZWHEELS WHEELS 15-Oct-88 123 15 PERAK SME WHEELS 12-Nov-88 522 16 KL TOYOTA SUSPENSION 11-May-89 612 17 KL TOYOTA BRAKES 11-May-89 600 18 PERAK SME COVERBODY 12-Jan-89 512 19 MELAKA PROTON BRAKES 15-Oct-89 444 21 MELAKA SME BRAKES 12-Jan-89 400 22 MELAKA SPAREPRO ENGINE 16-Dec-89 100 23 PERAK TOYOTA COVERBODY 11-Dec-89 800 25 KEDAH SME FRAME 12-Jun-89 321 26 KEDAH NZWHEELS COVERBODY 14-Jun-89 511 27 KL NZWHEELS BRAKES 15-Jun-89 211 28 KL SPAREPRO BRAKES 16-Jun-89 114 31 KEDAH SME ENGINE 18-Nov-89 500 32 KEDAH TOYOTA SUSPENSION 18-Nov-89 600 33 KL NZWHEELS COVERBODY 16-Jun-89 415 34 KL TOYOTA ENGINE 14-Jun-89 562 35 KL SPAREPRO WHEELS 16-Dec-89 871 36 PERAK SPAREPRO BRAKES 16-Dec-89 411 37 PERAK TOYOTA ENGINE 16-Jun-89 512 38 PERAK SME FRAME 16-Jun-89 566 41 MELAKA TOYOTA FRAME 14-Jun-89 122 42 MELAKA NZWHEELS SUSPENSION 18-Nov-89 560 43 MELAKA SPAREPRO WHEELS 14-Jun-89 200 66 Figure 9-2 : PURCHASE table Based on the information, you need to perform the following tasks: b Develop purchase star schema c Define all dimension attributes d Define attribute hierarchies if any for the model e Generate a cross tab report using Microsoft Access based on 3-D cylinder Column chart to show the total purchase of car supplies units by branch. The sample output is shown in Figure 9-3 Figure 9-3 : A cross tab report 67

9.3 Self Review Questions