EPFL - Databases - Quiz 4


Query Processing

1) Assume a relation R with 50 pages and 20 tuples per page and a relation S with 100 pages and 10 tuples per page. The cost of a simple Nested Loop between R and S is (R is outter and S is inner):
5050
300
100000
100050

2) Which database operation cannot be used for duplicate elimination?:
Hash
Sort
Join
Index access

3) With the same setup, the cost of Hash Join is:
5050
450
300
150

4) Which of the following statements about Hash Join is true?
In matching phase we need to read only the largest relationship.
In partitioning phase each relation is read once.
In matching phase we need to read only the smallest relationship.
In partitioning phase each relation is read twice.

5) Most selective access path is the access path that retrieves the fewest ______ during query evaluation.
tables
rows
pages
columns


Query Optimization

6) Assume that the result of an operator can be used as it is being created from the operator that follows in the query plan. This is called:
Materialization
Evaluation
Pipelining
Forwarding

7) Which database operator cannot be pipelined in any case?
Sort
Join
Selection
Projection

8) Which statement defines query flattening?
Eliminate the unnecessary columns while scanning
Convert correlated subquery into uncorrelated subquery
Convert query with nesting into query without nesting
Eliminate the unnecessary rows while scanning

9) Which of the following orders of an intermediate result does not constitute an interesting order?
intermediate result ordered by ORDER BY attributes
intermediate result ordered by GROUP BY attributes
intermediate result ordered by JOIN attributes of other joins
intermediate result ordered by primary key

10) Which attribute need not be examined to compute the answer of the query:
SELECT MAX(E.sal) FROM Emp E, Dept D WHERE E.did = D.did
The schema is the following:
Emp(eid: integer, did: integer, sal: integer, hobby: char(20))
Dept(did: integer, dname: char(20), floor: integer, budget: real)
D.floor
E.sal
E.did
D.did

Feedback form
If you want to ask for feedback please fill in this form with the information of the question, of your answer and any question you may have.

Quiz script provided by
JavaScriptKit.com