You are on page 1of 1

CS122A:

Introduction to Data Management


Quiz 9



Taken by:



Graded by:





Winter 2015
_____________________
Score (out of 10)

_______________________________________________
Name

_______________________________
Student ID

_______________________________________________
Name

_______________________________
Student ID

You will have 15 minutes to finish this quiz.

1. Continuing to improve the performance of their database, AB&C wants to create


additional indexes to help with the following queries. For each query, identify (1)
which column(s) to index on, (2) whether to use a B+-Tree or Hashing, (3) whether
it should be a clustered index, and (4) if the query can be index-only. Treat each
query as an independent problem 8 points:

a) SELECT * FROM Customer WHERE name = John Doe



b) SELECT * FROM Customer C JOIN PhoneLine P ON C.id = P.cid WHERE
P.opened < 2015-01-01



c) SELECT COUNT(*) FROM DeviceModel WHERE storageCapacity BETWEEN
10 and 16



d) SELECT manufacturerName, COUNT(DISTINCT storageCapacity) FROM
DeviceModel GROUP BY manufacturerName



2. By now, AB&C has decided to switch their main database to AsterixDB. Which of
these could have been reasons for doing so (select all that apply) 2 points:
o Their previous relational database did not scale up well enough
o They wanted to use Hive instead of SQL
o They want to efficiently ingest a lot of data, e.g., their users positional data
o Their previous database model was not flexible enough

You might also like