Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Following is the schema of the product database: Product(maker, model, type) PC(model, speed, ram, hd, price) Laptop (model, speed, ram, hd, screen, price) Printer (model,

Following is the schema of the product database:

Product(maker, model, type)

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

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

Printer (model, color, type, price)

The Product relation gives the manufacturer, model number and type (PC, laptop, or printer) of various products. We assume for convenience that model numbers are unique over all manufacturers and product types (i.e., model is the primary key). The PCrelation givesfor eachmodel number that is a PC the speed (of the processor in gigahertz), the amount of RAM (in megabytes), the size of the hard disk (in gigabytes), and the price. The Laptoprelation is similar, except that the screen size (in inches) is also included. The Printer relation records for each printer model whether the printerproduces color output (true if so), the process type (laser or inkjet, typically), and the price.

5. Find the maker(s) of the PC(s) with the fastest processor among all these PC's that have the smallest amount of RAM.

6. Find the average price of PC's and laptops made by manufacturer "D".

7. Find, for each different speed, the average price of a PC.

8. Find those hard-disk sizes that occur in two or more PC's.

9. Find those pairs of PC models that have both the same speed and RAM. A pair should be listed only once ; list (i,j) but not (j,i)

10. Find those manufacturers of at least two different computers (PC's or Laptops) with speeds at least 3.0.

All queries should be contained in a single plain text file with a .sql extension. Queries must be in the order above. Don't forget to separate each query with a semi-colon.

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

More Books