Question: For this assignment, you will develop a series of transactions using Data Manipulation Language in MySQL . Designed SQL transactions that effectively uses INSERT, UPDATE,
For this assignment, you will develop a series of transactions using Data Manipulation Language in MySQL.
Designed SQL transactions that effectively uses INSERT, UPDATE, DELETE statements.
Now that the database has been populated, SmartHomes needs DML statements in order to insert, update, and delete content from their site. Although these statements need to be customized to allow input from the website, Smarthomes wants statements based on the dummy data in the database first to ensure that they work correctly. Some of them may require multiple statements and need to consider the order in which the statements must occur.
1. A "fake" user has made a few orders. DELETE the user account along with all of their orders.
2. Insert a new product with no category included. Then run an update statement to add it to a category.
3. There has been a price increase on some items. UPDATE all product prices that are greater than $10 to be $1 more.
4. The database server had been reset with the wrong date and time without anyone knowing. UPDATE any order date in the past week to add 7 days.
5. There are too many user accounts that do not have any orders and they should be removed. DELETE all customer records that do not have any orders.
6. UPDATE the product's description to include on the following string on those products that have not been ordered yet: "Special promotion: 25% off."
7. While the Web site was down, someone had taken in a manual order. Create the INSERT statements to add a customer and their 3 products that they have purchased.
8. A customer had called in with their name (no order or customerID), they had purchased the incorrect product. Using an UPDATE statement, update the OrderDetail table using their first and last name (consider it to be unique).


Tables (Filtered) CATEGORY CATEGORYID DESCRIPTION CUSTOMER EMAIL USERNAME PASSWORD PHONE CITY FIRSTNAME STATE LASTNAME ADDRESS COUNTRY ORDER1 ORDER!D SHIPDATE CUSTOMER!D ORDERDATE 0RDERDETAIL RDERDETAILID EBORDERID PRODUCTID PRICE QUANTITY | B PRODUCT PRODUCTNAME PRODUCTDESCRIPTION UNITPRICE PICTURE
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
