0% found this document useful (0 votes)
114 views1 page

Product Laptop: R4 : Given Following Relational Schema

Uploaded by

na
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views1 page

Product Laptop: R4 : Given Following Relational Schema

Uploaded by

na
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Given following relational schema:

 Product(model, maker, type)


 PC(model, speed, ram, hd, price)
 Laptop(model, speed, ram, hd, screen, price)
 Printer(model, color, type, price)

Proplem 1. Write expressions of relational algebra to answer the following queries.

(a) What PC have a speed more than 2.00? Show all attributes.
R1 :  model, speed, ram, hd, price  speed 2.00  PC  

(b) What PC models have a speed more than 2.00?


R2 :  model  speed  2.00  PC  

(c) Find the model numbers of all color laser printers.

R3 :  model  color"true" and type"laser" Printer  

(d) Which manufacturers make laptops with a hard disk of at least 150GB?

R4 :  maufacturer   hd 150  Laptop  Product  

Proplem 2. Express the following constraints about the above relations.

(a) A PC with a processor speed less than 2.00 must not sell for more than $500.

 speed  2.00 and price 500  PC   


(b) No manufacturer of PC’s may also make laptops.
R1 :  (Product)
R 2 :  (Product)
 (R1.model  R2.model and R1.type"PC" and R2.type"Laptop")  R1 x R2  

You might also like