Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

.\'Il Sprint? 2:43 PM 57% i Assignment5.docx ? Copy Look Up Share nment #5 Creat

ID: 3704731 • Letter: #

Question

.'Il Sprint? 2:43 PM 57% i Assignment5.docx ? Copy Look Up Share nment #5 Create code for the following (use proper naming conventions when necessary) A. 4 Tables o Vehicle Primary Key VIN Foreign Key ManNo, StoreNo Other Attributes - Type, Class, Speed, Price o Manufacturer Primary Key ManNo Other Attributes- HomeOfficeAdd, ShippingMethod o Store Primary Key StoreNo, . Other Attributes- Address, PhoneNo Car Dealership Z Is shipped Vehicle-Store Receives Creates Mar Is created by A manufacturer may create many vehicles. A vehicle is created by I manufacturer. A vehicle is shipped to I store. A store may receive many vehicles. B. Adding a column to the vehicle table called Safety C. Insertion of the following values into the Store Table: 010, 4674 place dr new York NY 23452 D. Insertion of the following values into the Vehicle Table: 7985156596, 009, 101, 2435 Penbrooke place upper Marlboro md 20774 E. A deletion of the entire Vehicle table F. Create a new table from a subset of the vehicle table. Call the new table TopRatedSafetySpecs and have safety is equal to Top Rated Questions: What command would update an attribute in its primary table and that same attribute in any other tables that it is in

Explanation / Answer

Solution:

The first four subparts have been answered as per Chegg guidelines, please repost others.

A)

CREATE TABLE Manufacturer(
ManNo int NOT NULL,
HomeOfficeAdd varchar(20),
ShippingMethod varchar(20),
    PRIMARY KEY (ManNo),
  
);

CREATE TABLE Store(
StoreNo int NOT NULL,
Address varchar(20),
PhoneNo int(20),
    PRIMARY KEY (StoreNo),
  
);

CREATE TABLE Vehicle(
    VIN int(20),

Type varchar(20),

Class varchar(20),

Speed varchar(20),

Price float,

StoreNo int,

ManNo int
PRIMARY KEY (VIN),
    CONSTRAINT FK_StoreNo FOREIGN KEY (StoreNo)
    REFERENCES Store(StoreNo)

CONSTRAINT FK_ManNo FOREIGN KEY (ManNo)
    REFERENCES Manufacturer(ManNo)
);

B)

ALTER TABLE Vehicle

ADD COLUMN Safety varchar(20);

C)

INSERT INTO Store(StoreNo, Address, PhoneNo)

VALUES ('010', 'dr New York NY 23452', '4674');

D)

INSERT INTO Vehicle(VIN, StoreNo, ManNo, Type, Price, Speed)

VALUES ('7985156596', '009', '101', '2345');

I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)