Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Following is the scheme of the product database Productmaker, model, type) PC(model, speed, ram, hd, price) Laptop (model, speed, ram,hd, screen, price) Printer (model, color,

image text in transcribed
Following is the scheme of the product database Productmaker, model, type) PC(model, speed, ram, hd, price) Laptop (model, speed, ram,hd, screen, price) Printer (model, color, type, price) The Product relation gives manufacturer, model number and type (PC, laptop, or printer) of various products. We assume for convenience that model numbers are unique over al manufacturers and product types (te model is the primary key). The PC relation gives for each model 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 Laptop relation is similar, except that the screen size (in inches) is also included. The Printer relation records for each printer model whether the printer produces color output (true if so), the process type (laser or inkjet typicaly), and the price Write the following sel queries using the Product DB Task 1: (10x5 50 points) 1. Find the printers with the highest price 2. Find the laptops whose speed is slower than that of any PC. 3. Find the model number of the dem (PC, laptop, printer with the highest price 4. Find the maker of the color printer with the lowest price. 5. Find the maker(s) of the PCs) 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 toptops 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) but not :) 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 Task 2: (10x5 + 50 points) 1. Write the relational algebra expression for each query All algebraic expression should be contained in a single plain text file with a pdf extension. You can hand write them as well as long as they are legible enough

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_2

Step: 3

blur-text-image_3

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

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions