A small shop wants to create a simple database to keep track of its merchandise prices, buyers and purchase...


A small shop wants to create a simple database to keep track of its merchandise prices, buyers and purchase orders. For simplicity, a merchandise will be recorded for its name and price, a buyer will be recorded for its name, and order will be recorded for its date and all the items included in the order. i. Design a minimum database (a database of only essential attributes) to fulfil this purpose, and draw the ER diagram for your design. Indicate on the ER diagram the primary keys and the relationship multiplicities. By minimum we mean that you don't need to add anything that is not explicitly stated in the requirements, unless it's one of your artificially generated keys. For instance, you don't need to include a telephone number or email address for the entity corresponding to a buyer.ii. Draw the Global Relation Diagram (GRD) corresponding to the ER diagram in the above, indicating all the primary keys and foreign keys. The GRD should be in a form similar to Figure 17.9 (page 554 or 516 for edition 5) of the textbook, but all the attributes should be kept there too.  iii. Write an SQL script (of statements) that generates all the tables for your designed database. iv. Write an SQL script to insert sufficient records into your tables. Each table should contain no less than 3 records. At least 2 orders should each contain 2 or more items of the ordered merchandise. Screenshots are required for the records of all the tables.  v. List all all buyers whose name contains your own family name as a substring. Insert sufficient records into your table/s so that your query returns at least 2 records. (screenshot required).

vi. For a given order (number), write an SQL statement to list all the item names and their corresponding prices for the order (screenshot required).vii. List all the orders by their order number, date, and the name of the buyer who places that order





Oct 07, 2019
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here