Question: maker I model I type A 1001 pc A 1002 pc A 1003 pc A 2004 laptop A 2005 laptop A 2006 laptop B 1004

maker I model I type A 1001 pc A 1002 pc A 1003 pc A 2004 laptop A 2005 laptop A 2006 laptop B 1004 pc B 1005 pc B 1006 pc B 2007 laptop c 1007 pc D 1008 pc D 1009 pc D 1010 pc D 3004 printer D 3005 printer E 1011 pc E 1012 pc E 1013 pc E 2001 laptop E 2002 laptop E 2003 laptop E 3001 printer E 3002 printer E 3003 printer F 2008 laptop F 2009 laptop G 2010 laptop H 3006 printer H 3007 printer

Sample data for Product

model I speed I ram I hd / price 1001 2.66 1024 250 21.14 1002 2.10 512 250 995 1003 1.42 512 80 478 1004 2.80 1024 250 649 1005 3.20 512 250 630 1006 3.20 1024 320 1049 1007 2.20 1024 200 510 1008 2.20 2048 250 770 1009 2.00 1024 250 650 1010 2.80 2048 300 770 1011 1.86 2048 160 959 1012 2.80 1024 160 649 1013 3.06 512 80 529 (a) Sample data for relation PC

model I speed I ram I hd I screen I price 2001 2.00 2048 240 20.1 3673 2002 1. 73 1024 80 17 .o 949 2003 1.80 512 60 15.4 549 2004 2.00 512 60 13.3 1150 2005 2.16 1024 120 17.0 2500 2006 2.00 2048 80 15.4 1700 2007 1.83 1024 120 13.3 1429 2008 1.60 1024 100 15.4 900 2009 1.60 512 80 14.1 680 2010 2.00 2048 160 15.4 2300 (b) Sample data for relation Laptop

model I color type I price 3001 true ink-jet 99 3002 false laser 239 3003 true laser 899 3004 true ink-jet 120 3005 false laser 120 3006 true ink-jet 100 3007 true laser 200 (c) Sample data for relation Printer

Write the following queries in SQL, and show the result of your queries using the data from Exercise 2.4.1. Note that you will need to CREATE TABLES based on the above schemas and INSERT all the tuples into those tables before answering the following questions in SQL.

1. Give the manufacturer and speed of laptops with a hard disk of at least thirty gigabytes.

2. Find the model number and price of all products (of any type) made by manufacturer B.

3. Find those hard-disk sizes that occur in two or more PCs.

4. Find those pairs of PC models that have both the same speed and RAM. A pair should be listed only once; e.g., if (i, j) is listed, then no (j, i) in the list.

5. Find those manufacturers of at least two different computers (PCs or laptops) with speeds of at least 3.0.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!