0% found this document useful (0 votes)
34 views2 pages

DW Design Ex

Uploaded by

salma ben hssin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views2 pages

DW Design Ex

Uploaded by

salma ben hssin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Relational DW Design

Dr. Rim Moussa

Ex.#1 Suppose that a data warehouse consists of the three dimensions time, doctor, and patient,
and the two measures count and charge, where charge is the fee that a doctor charges a patient for
a visit. Design a data warehouse schema and propose an OLAP cube. Your design should facilitate
efficient querying and on-line analytical processing.
(a) Draw a schema diagram for the above data warehouse
(b) Starting with the base cuboid [day; doctor; patient], what specific OLAP operations should be
performed in order to list the total fee collected by each doctor in 2004?
(c) To obtain the same list, write an SQL query assuming the data is stored in a relational database
with the schema fee (day,month,year, doctor,hospital,patient,count,charge).
Ex.#2 Design a data warehouse schema for a regional weather bureau and propose an OLAP cube.
The weather bureau has about 1,000 probes, which are scattered throughout various land and
ocean locations in the region to collect basic weather data, including air pressure, temperature, and
precipitation at each hour. All data are sent to the central station, which has collected such data for
over 10 years. Your design should facilitate efficient querying and on-line analytical processing, and
derive general weather patterns in multidimensional space.
Ex.#3 Suppose a company would like to design a data warehouse that may facilitate the analysis of
moving vehicles in an online analytical processing manner. The company registers huge amounts of
auto movement data in the format of (AutoID, location, speed, time). Each AutoID represents one
vehicle associated with information, such as vehicle category, driver category, etc., and each location
could be associated with a street address in a city. Propose a data warehouse schema and an OLAP
cube. Your design should facilitate efficient querying and on-line analytical processing.
Ex.#4 A marketing department of a telecom operator would like to track phone calls of customers
according to multiple dimensions. Propose a data warehouse schema and an OLAP cube for
tracking promotions and sales. Your design should facilitate efficient querying and on-line analytical
processing.

Relational DW Design
Dr. Rim Moussa

Ex.#1 Suppose that a data warehouse consists of the three dimensions time, doctor, and patient,
and the two measures count and charge, where charge is the fee that a doctor charges a patient for
a visit. Design a data warehouse schema and propose an OLAP cube. Your design should facilitate
efficient querying and on-line analytical processing.
(a) Draw a schema diagram for the above data warehouse
(b) Starting with the base cuboid [day; doctor; patient], what specific OLAP operations should be
performed in order to list the total fee collected by each doctor in 2004?
(c) To obtain the same list, write an SQL query assuming the data is stored in a relational database
with the schema fee (day,month,year, doctor,hospital,patient,count,charge).
Ex.#2 Design a data warehouse schema for a regional weather bureau and propose an OLAP cube.
The weather bureau has about 1,000 probes, which are scattered throughout various land and
ocean locations in the region to collect basic weather data, including air pressure, temperature, and
precipitation at each hour. All data are sent to the central station, which has collected such data for
over 10 years. Your design should facilitate efficient querying and on-line analytical processing, and
derive general weather patterns in multidimensional space.
Ex.#3 Suppose a company would like to design a data warehouse that may facilitate the analysis of
moving vehicles in an online analytical processing manner. The company registers huge amounts of
auto movement data in the format of (AutoID, location, speed, time). Each AutoID represents one
vehicle associated with information, such as vehicle category, driver category, etc., and each location
could be associated with a street address in a city. Propose a data warehouse schema and an OLAP
cube. Your design should facilitate efficient querying and on-line analytical processing.
Ex.#4 A marketing department of a telecom operator would like to track phone calls of customers
according to multiple dimensions. Propose a data warehouse schema and an OLAP cube for
tracking promotions and sales. Your design should facilitate efficient querying and on-line analytical
processing.
Ex.#5 A university wants to analyze the results of its students and the quality of its courses over
time. For this purpose they want to create a data warehouse that will store the results of all students.
A student is registered for a program which consists of several courses taught by one or more
lecturers in a semester. Every course has a course code, a name, the number of lecturing hours and
the number of hours for exercises and lab sessions. A lecturer belongs to a department and a
department to a faculty. A student can take one or more exams for a course. In case of multiple
exam trials, all results should be stored. For a student, his or her name, student identifier, gender,
and date of birth are stored. Furthermore, every course offering is evaluated by the students. This
evaluation results in three scores: one for course delivery, one for course content and one for overall
appreciation. Based on the data in the data warehouse it should be possible to evaluate the exam
results by student, by program, by academic year, by course, by department, etc. Furthermore
courses will be evaluated on the basis of their evaluations by year, by lecturer, by program, etc
(a) Draw a snowflake schema diagram for the data warehouse.
(b) Propose OLAP cubes for assessing programs and students' evaluations.
Ex.#6 Design the data warehouse for a wholesale furniture company. The data warehouse has to
allow to analyze the company’s situation at least with respect to the Furniture, Customers and Time.
Moreover, the company needs to analyze: the furniture with respect to its type (chair, table,
wardrobe,cabinet. . . ), category (kitchen, living room, bedroom,bathroom, office. . . ) and material
(wood, marble. . . ) the customers with respect to their spatial location, by considering at least cities,
regions and states. The company is interested in learning at least the quantity, income and discount
of its sales. Identify facts, dimensions and measures
Ex.#7 CDC/ the data warehouse of a retail company includes a customer table (c-id, c-lname, c-
fname, c-dob, c-city, …). The cube sales calculates the sum of sales customer-city-wise product-
type-wise and store-city-wise.
Propose solutions in order to handle a customer address update accurately?
Sources:
Ex 1,2,3: https://pdfs.semanticscholar.org/1df5/4b15e18d58dee0fadf124ed709906fcf0d76.pdf
Ex6: Mirjana Mazuran http://home.deib.polimi.it/schreibe/TeSI/Materials/Orsi/DWexercise.pdf

Ex.#5 A university wants to analyze the results of its students and the quality of its courses over
time. For this purpose they want to create a data warehouse that will store the results of all students.
A student is registered for a program which consists of several courses taught by one or more
lecturers in a semester. Every course has a course code, a name, the number of lecturing hours and
the number of hours for exercises and lab sessions. A lecturer belongs to a department and a
department to a faculty. A student can take one or more exams for a course. In case of multiple
exam trials, all results should be stored. For a student, his or her name, student identifier, gender,
and date of birth are stored. Furthermore, every course offering is evaluated by the students. This
evaluation results in three scores: one for course delivery, one for course content and one for overall
appreciation. Based on the data in the data warehouse it should be possible to evaluate the exam
results by student, by program, by academic year, by course, by department, etc. Furthermore
courses will be evaluated on the basis of their evaluations by year, by lecturer, by program, etc
(a) Draw a snowflake schema diagram for the data warehouse.
(b) Propose OLAP cubes for assessing programs and students' evaluations.
Ex.#6 Design the data warehouse for a wholesale furniture company. The data warehouse has to
allow to analyze the company’s situation at least with respect to the Furniture, Customers and Time.
Moreover, the company needs to analyze: the furniture with respect to its type (chair, table,
wardrobe,cabinet. . . ), category (kitchen, living room, bedroom,bathroom, office. . . ) and material
(wood, marble. . . ) the customers with respect to their spatial location, by considering at least cities,
regions and states. The company is interested in learning at least the quantity, income and discount
of its sales. Identify facts, dimensions and measures
Ex.#7 CDC/ the data warehouse of a retail company includes a customer table (c-id, c-lname, c-
fname, c-dob, c-city, …). Cube sales calculates the sum of sales customer-city-wise product-type-
wise and store-city-wise.
Propose solutions in order to handle a customer address update accurately?
Sources:
Ex 1,2,3: https://pdfs.semanticscholar.org/1df5/4b15e18d58dee0fadf124ed709906fcf0d76.pdf
Ex6: Mirjana Mazuran http://home.deib.polimi.it/schreibe/TeSI/Materials/Orsi/DWexercise.pdf

You might also like