Database Reference
In-Depth Information
13.14
How do IMDBSs guarantee the ACID properties? Give an answer for
each property.
13.15
What is the main difference between the approach of SQL Server's
xVelocity and the systems above?
13.16
What are real-time data warehouses? Explain the different alterna-
tives for modeling real-time fact tables.
13.17
How can we achieve real-time ETL? Do we always need real-time
ETL? Why? Explain.
13.18
Explain the concept of right-time data warehouses and how it differs
from real-time data warehouses. Explain an approach to achieve right-
time data warehouses.
13.19
How does ELT differ from ETL? Choose an application scenario you
are familiar with for motivating the use of ELT.
13.11 Exercises
13.1
Consider that the Northwind database has been loaded into the HDFS.
We want to implement the relational algebra operations over this
database using Pig Latin as follows:
(a) Express the projection over the last name of the
Employees
table.
(b) Express the selection of
EmployeeID=3
on the
Employees
table.
(c) Over the
Orders
table, obtain the number of deliveries grouped by
shipper.
(d) List the
Orders
table in descending order of
ShipName
.
(e) Perform the natural join between the
Orders
and
Employee
tables
on
EmployeeID
.
(f) Perform the left outer join between the
Orders
and
Employee
tables
on
PostalCode
and
ShipPostalCode
on
Orders
.
(g) Same as (e) for the right outer join, but joining also by
EmployeeID
.
13.2
Using the Northwind database of Ex.
13.1
:
(a) Define the database in HiveQL.
(b) Express the queries of Ex.
13.1
in HiveQL.
13.3
Consider the Northwind database and the following query:
SELECT CustomerName, SUM(SalesAmount)
FROM Sales S, Customer C, Product P, Time T, Employee E
WHERE S.CustomerKey = C.CustomerKey AND
S.ProductKey = P.ProductKey AND
P.Discontinued =
'
Yes
'
AND
S.TimeKey = T.TimeKey AND T.Year =
'
2012
'
AND
S.EmployeeKey = E.EmployeeKey AND E.City =
'
Berlin
'
GROUP BY C.CustomerName
Search WWH ::
Custom Search