Answered step by step
Verified Expert Solution
Question
1 Approved Answer
create a new database called Assignment1_firstname_lastname- replace firstname_lastname with your first name and last name. 2. After you have created your database successfully then
create a new database called "Assignment1_firstname_lastname"- replace firstname_lastname with your first name and last name. 2. After you have created your database successfully then switch to it using the "USE" keyword. 3. Create a Table called "Dealership", it will look like the below table. The datatype will be in the second row. Any constrictions on the table will be in the third row. (Note PK means primary key, FK means Foreign Key) Name String (25 length) UNIQUE ID Whole Number PK AUTO INCREMENT VIN String (25) PK City String (25) NOT NULL 1. Create another table called "CARS", it will look like the below table. The datatype will be in the second row. Any constrictions on the table will be in the third row. Make String (25) Model String (25) ManagerName String (25) NOT NULL Price Floating point number NOT NULL DealershipID Whole Number FK NOT NULL ("1GCDC14H5DS161081","Chevy", "K10", 1000.59, 2), ("JN1DA31A52T300757", "Nissan", "Maxima", 2078.99, 1), ("WAUDK84AXRN029130", "Audi", "100", 10000.00, 3), ("1VWCG9178BV261632", "Volkswagen", "Rabbit", 500.90, 4), ("WVWGA0337CE005866", "Volkswagen", "Quantum", 850.90, 4), ("KMHDU4AD4AU955646", "Hyundai", "Elantra", 6000, 1), ("YOUR OWN_DATA ", " YOUR_OWN_DATA ", " YOUR OWN_DATA", YOUR_OWN_DATA, 1) 2. Once you have completed creating the tables, we will add some data. Attached is part of the data (mostly the information), it is up to you to correctly ensure that the data is added to the table and the correct order to add them in. NOTE: ensure you replace any FIRSTNAME_LASTNAMES values or YOUR OWN_DATA values. CAR DATA: DEALERSHIP DATA: ("AS1 Cars", "Ottawa", "FirstName LastName"), ("Vinnie's", "Michigan", "Vinnie Vince"), ("True Cars", "Toronto", "Max Cars"), ("Volkswagon", "Frankfurt", "Johan Volks") BEFORE HANDING IN: You should have a word document with: SQL command for: 3. After adding the new data to each table, we will perform the following updates, and deletes. Update: You noticed that there was a typo in the Volkswagen Dealership. Someone added "Volkswagon" instead. Change the spelling from "Volkswagon to Volkswagen" using a update statement. Delete: The deal to move the Audi 100 to the dealership "True Cars" fell through. You will need to delete that entry in the cars table. Delete the Car "Audi 100" from the cars table. 4. Once completed, right click each table, and click "Select rows - limit 1000". You will get the results of those tables with the updates and deletes. Take a screenshot of each table's data and add it to your word document with ALL your SQL statements. Creating a new database, Switching focus to the new database Creating first table Creating second table Adding dealership data Adding car data Updating a table Deleting data in a table And two screenshots with output.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started