Starting from:

$30

CSE111–Quiz 2 Solved

DATABASESYSTEMS

 (30 points)

Consider the following relational schema, provided as a SQLite database populated with sample data:

•    Product(maker, model, type)

•    PC(model, speed, ram, hd, price)

•    Laptop(model, speed, ram, hd, screen, price)

•    Printer(model, color, type, price)

Draw optimized relational algebra query execution trees for the following queries (5 points each). Show the schema for every intermediate operator as well as the root of the tree.

1.    What makers produce Laptops cheaper than $2000 with a screen larger than 16?

2.    What makers produce PCs but do not produce Laptops?

3.    For every maker that sells both PCs and Printers, find the combination of PC and Printer that hasmaximum price. Print the maker, the PC model, Printer model, and the combination price (PC price + Printer price).

4.    What Laptop hd sizes are offered in at least 2 different models?

5.    What PCs are less expensive than all the Laptops? Print the model and the price.

6.    What makers produce at least a Laptop model and at least 2 Printer models?

Draw/write your answers in a doc file or presentation slides. Convert to pdf and upload the pdf file to CatCourses.

More products