Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. [20 Points] Exercise 6.5.1, parts: a, c, e, f on page 295 in the textbook, with details as follow. Consider the schema of the

image text in transcribed

image text in transcribed

image text in transcribed

4. [20 Points] Exercise 6.5.1, parts: a, c, e, f on page 295 in the textbook, with details as follow. Consider the schema of the CED database introduced above in question 2 . Using SQL, express the following modifications on the data. (a) Using two INSERT statements, store in the database the fact that the PC model 1100 is made by manufaturer C , has speed 3.2, RAM 1024, hard disk 180, and sells for $2499. (c) Delete all PC's with less than 100 GB of hard disk. (e) Manufacturer A buys manufacturer B. Change all products made by B so they are now made by A. (f) For each PC, double the amount of RAM and add 60 GB to the amount of hard disk. Note that several attributes can be changed by a single UPDATE statement. 2. [20 Points] Exercise 2.3.1, parts: c, d, e, f on page 36 in the textbook. Consider the following database schema for a Computer Equipment store (CED): Product(maker, model, type) PC(model, speed, ram, hd, price) Laptop(model, speed, ram, hd, screen, price) Printer(model, color, type, price) The attributes of relation Product include: manufacturer, Model, and the equipment Type; the attributes of relation PC include Model, Speed, RAM, HD, and Price; For relation Laptop, the attributes include the following attributes: Model, Speed, RAM, HD, Screen, Price; and for relation Printer, we have the attributes Model, Color, Type, Price. Some explanations about this database. Relation Product records information about the model number and type of each equipment which could be pc, laptop, or printer. For convenience, assume that the model numbers of the equipments are unique across all manufacturers and product types. This assumption is not realistic, so explain how you would modify the database schema for a realistic situation? For each model number of a PC, the PC relation records the processor speed (in GHz), the RAM size (in MB), the size of the hard disk (in GB), and the price (in dollar). The information stored as the Laptop relation is similar to PC except that it records the screen size (in inches) as well. The color attribute in printer could have the true/false value, which indicates whether it is a color printer or otherwise. A printer type could be laser or ink-jet. Write the following schema declarations or modifications in SQL

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

Oracle Solaris 11.2 System Administration (oracle Press)

Authors: Harry Foxwell

1st Edition

007184421X, 9780071844215

More Books

Students also viewed these Databases questions

Question

2. Do you find change a. invigorating? b. stressful? _______

Answered: 1 week ago

Question

How was their resistance overcome?

Answered: 1 week ago