sol4.pdf - IEDA 3300 Industrial Data Systems Fall 2018 Homework 4 Due 4:30 p.m Friday Q1(8 8 8 8 18 pts Consider the following database of a car dealer

sol4.pdf - IEDA 3300 Industrial Data Systems Fall 2018...

This preview shows page 1 - 3 out of 5 pages.

IEDA 3300 Industrial Data Systems Fall 2018 Homework 4 Due: 4:30 p.m. Friday, Nov 23 2018 Q1. (8 + 8 + 8 + 8 + 18 pts.) Consider the following database of a car dealer. Write down the schema change statement for the following requirements. CUSTOMER Name PhoneNumber Email NoOfPurchase PURCHASING_RECORD RecordID Date Email CarID CAR CarModel Brand Price CarID CAR_BRAND_MANAGER Brand ManagerName CAR_MODEL_INFORMATION CarModel Colour Weight a) Add an attribute Cost into the table CAR_MODEL_INFORMATION. b) Remove attribute Price from the table CAR. c) Remove attribute PhoneNumber from the table CUSTOMER. d) Set the default number of NoOfPurchase to be 1. e) Create a new table CAR_NEW which contains all the information from the tables CAR and CAR_MODEL_INFORMATION, and use this new table to replace these two tables. Ignore all the updates from part a to d.
Image of page 1

Subscribe to view the full document.

Q1 Solution a) ALTER TABLE CAR_MODEL_INFORMATION ADD COLUMN Cost DECIMAL(10,2); b) ALTER TABLE CAR DROP COLUMN Price CASCADE; c) ALTER TABLE CUSTOMER DROP COLUMN PhoneNumber CASCADE; d) ALTER TABLE CUSTOMER ALTER COLUMN NoOfPurchase SET DEFAULT 1; e)
Image of page 2
Image of page 3
  • Fall '18
  • QiQi

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes