• Non ci sono risultati.

Data Warehousing Politecnico di Torino

N/A
N/A
Protected

Academic year: 2021

Condividi "Data Warehousing Politecnico di Torino"

Copied!
2
0
0

Testo completo

(1)

Data Warehousing

Politecnico di Torino Vehicle rental

Problem specifications

A big company for vehicle rental operating in Italy is interested in performing some analyses on its historical data. The internal database stores for each rental the departure and arrival locations. The analysis must be accomplished separately for the different vehicle models made available by the company. Vehicle models are characterized by brand, type (e.g. “car”, “van”, “truck”, ...) and options.

Zero or more options can be available for each vehicle model. The number of types of options is unspecified at design time. The company also records the start date of the rental and the payment method. Moreover, they are interested in client profiles. Specifically, the client type (i.e. “standard”,

“gold”, “gold-plus”) and his/her domicile are stored in the database.

The company is interested in analyzing the average revenue (in euros) and the average distance (in kilometers) made with its vehicles for different rentals. The analysis must be carried out based on:

departure city, province, region

arrival city, province, region

vehicle model, brand, type, options

rental start date (e.g. 06/01/2019), month, trimester, two-months, six-months, year, month of the year (e.g. “January”), day of the week (e.g. “Tuesday”), working day (i.e. yes/no)

payment method (credit card, prepaid card, etc.)

client type, province and region of domicile

(2)

Design

Design the data warehouse to address the specifications and to efficiently answer to the provided frequent queries. Draw the conceptual schema of the data warehouse and the logical schema (fact and dimension tables).

Query

Write the following frequent queries using the extended SQL language.

a) Consider the rentals payed with credit card. Separately for each month, client type, province of the client’s domicile, analyze: the average number of kilometers for rental, the cumulative number of kilometers from the beginning of the year, the average daily kilometers

b) Consider the rentals of “truck” vehicle type. Separately for each rental start month and for each departure province, analyze: the average revenue per kilometer, the percentage of revenue over the total revenue of the year, the percentage of revenue over the total revenue for the corresponding departure region

Riferimenti

Documenti correlati

[r]

Write the following frequent queries using the extended SQL language. a) Consider only private repositories. Separately for month and repository name, analyze: the number of

Separately for production month and factory, analyze: the cumulative monthly number of produced liters from the beginning of the year, the monthly percentage of liters produced

Separately for production month and factory, analyze: the cumulative monthly number of produced liters from the beginning of the year, the monthly percentage of liters produced

Write the following frequent queries using the extended SQL language. a) Separately for each purchase mode and for each purchase month, analyze: the average daily revenue, the

Considering the events that took place in 2017, separately for each singer/band nationality and for each city, analyze: the average revenue for a ticket, the percentage of revenue

trimester, analyze: the average delivery time, the average number of deliveries per time slot (the average number of deliveries made in an hour), assign a rank to the trimesters

Separately for mean of transport and trimester, analyze: the average delivery time, the average number of deliveries per time slot (the average number of deliveries made in an