Write the SQL queries for the following ER diagram:
Create all the tables and relationships (including all primary keys, foreign keys, attributes, and appropriate data types) shown in the ER diagram above. Insert 3 records into each table. In the Item table, consider the first record as your favorite dress, the second record as a gift that you have recently bought for someone, and the third record as your most favorite accessory that you are currently using; then insert the appropriate data. Similarly, insert some valid data into the other three tables. Write an SQL statement to update the third row of the Item table: Item_Name as 'Hat', Brand as 'Puma', and Type as 'Ferrari'. Write an SQL statement to display the Branch_ID, Location_ID, Item_ID, Units_Sold, and Dollars_Sold of each customer. Results should be in descending order of Item_ID. Also, write an SQL statement that displays the number of items, the sum of Units_Sold, and the sum of Dollars_Sold in each location. (Hint: Use group-by). Write an SQL statement to commit the database. Write an SQL statement to display all the tables' data separately. (Hint: Use select and display data separately for each table. No need to use any joins.) Write an SQL statement to drop all the tables that you have created in this assignment. Write an SQL statement to rollback the database. Write an SQL statement to display all the tables' data separately. (Hint: Use select and display data separately for each table. No need to use any joins.) If you get any data displayed in question-11, list the names of all the tables that got displayed and tell us why there is still data existing despite you dropping all the tables in question-09. (Please answer this in comments).
Item:
PK1 Item_ID
PK1 Time_ID
Day
Month
Item Name
Brand
Type
Supplier_Type
Sales
Quarter
PK1, FK1 Branch_ID
PK2, FK2 Location_ID
PK3, FK3 Item_ID
PK4, FK4 Time_ID
Year
Units-Sold
Dollars Sold
Branch:
PK1 Branch_ID
PK2 Location_ID
Branch_Name
Street
Branch_Type
City
State
Country