Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) A new company recently started a business where they buy highly discounted items in bulk from different companies who are going out of

1) A new company recently started a business where they buy highly discounted items in bulk fromdifferent companies who are 

1) A new company recently started a business where they buy highly discounted items in bulk from different companies who are going out of business or need to get rid of additional items to save warehouse space. This new company has retail stores in big cities across the country where they sell the items to individuals. They also do business as wholesalers where they sell items in bulk to local retailers in small cities. Therefore, they have two types of customers: individuals and small retailers. The company has four departments: purchase, warehouse, sales (retail and wholesale) and accounting. They employ five different types of employees: managers, accounting staffs, warehouse staffs, retail associates, and purchase agents. Each staff, agent and associate works under a manager of the respective department. Purchase agents hunt for discount items, and they get a commission based on the items they are successfully able to buy. Create a relational model to manage the database of this company. You have the freedom to make necessary assumptions about relations and attributes to create a realistic model. 2) Make sure you define primary and foreign key constraints properly. Give descriptive names to relations and attributes. 3) Design the database schema in LucidChart following the conventions used in the textbook. For each relation schema, provide justifications for your choice of the primary and foreign keys. 4) Use SQL commands to create the schema of your database. Also use SQL commands to enter at least 5 dummy tuples in each relation. 5) Create examples of SQL query employing each of the SQL clauses: a. Union 1 example b. Aggregate + Group by - 2 examples c. Nested query -2 examples For each example, include the query in natural language and corresponding SQL statements. Add additional tuples if required to run your queries successfully. For each query, provide the screenshot of the output of the query on MYSQL server.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Business Statistics For Contemporary Decision Making

Authors: Black Ken

8th Edition

978-1118494769, 1118800842, 1118494768, 9781118800843, 978-1118749647

More Books

Students also viewed these Accounting questions