Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please just do #6 Consider the following relational schema Product(maker, model, type) PC(model, speed, ram, hd, price) Laptop(model, speed, ram, hd, screen, price) . Printer(model,

image text in transcribedPlease just do #6

Consider the following relational schema Product(maker, model, type) PC(model, speed, ram, hd, price) Laptop(model, speed, ram, hd, screen, price) . Printer(model, color, type, price) Write the SQL statement and draw the optimized relational algebra query execution tree for each of the following queries (10 points/SQL 10 points/query tree) 1. What makers produce Laptops with screen larger than 15'' that are cheaper than $1,000? 2. What makers produce PCs or Laptops, but do not produce Printers? 3. How many makers produce each type of product? 4. For each maker who produces PCs with more than 4 GB of ram, find the average price of these PCs (with more than 4 GB of RAM). 5. For all the makers that produce PCs, Laptops, and Printers, find the minimum price of a package that includes a PC, a Laptop, and a Printer. 6. Out of all the makers that produce PCs, find the cheapest Laptop sold by them. 7. Find the maker that sells the most expensive PC and also sells Printers. 8. How many makers produce PCs with speed larger than 2.0, Laptops with hd larger than 250 GB, and laser printers? 9. We want to rate the value of each PC. The score is computed as the sum of three terms: the score of the speed; the score of the ram; and the score of the hd. Each of these is computed as the ratio between the attribute (i.e., speed, ram, or hd) and the price. List the PCs and their score in decreasing order of the score. 10. Find the makers that produce at least 5 different products out of which there is at least one product of each type (i.e., PC, Laptop, and Printer)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

Students also viewed these Databases questions

Question

4. Show the trainees how to do it again.

Answered: 1 week ago