354.3-08.Solution3

354.3-08.Solution3 - CMPT-354 D1 Fall 2008 Database Systems...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CMPT-354 D1 Fall 2008 Database Systems I Instructor: Martin Ester TA: Gustavo Frigo Solution Assignment 3 Total marks: 100 (10 % of the assignments) Due date: October 3, 2008 Assignment 3.1 Consider the following database schema: Product (model , maker, type) PC (model , speed, ram, hd, price) Laptop (model , speed, ram, hd, screen, price) If the type of a Product is “PC”, then there is a PC tuple with the corresponding attributes, if the type of a Product is “Laptop”, then there is a Laptop tuple with the corresponding attributes. a) Using two INSERT statements, store in the database the fact that PC model 1100 is made by manufacturer “C”, has speed 3.2, RAM 1024, hard disk 180, and price $2499. (10 marks) INSERT INTO Product VALUES (1100, “C”, “PC”); INSERT INTO PC VALUES (1100, 3.2, 1024, 180, 2499); b) For each Laptop made by manufacturer “B”, add one inch to the screen size and subtract $100 from the price. (15 marks) UPDATE Laptop SET screen = screen + 1, price = price – 100
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

354.3-08.Solution3 - CMPT-354 D1 Fall 2008 Database Systems...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online