Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Your company has been consulting with LookntheMirror Cosmetics over the last couple of months. It is an independent cosmetic manufacturing company that sells cosmetics to

Your company has been consulting with LookntheMirror Cosmetics over the last couple of months. It is an independent cosmetic manufacturing company that sells cosmetics to convenient stores via sales representatives. All sales data is currently maintained in an Excel spreadsheet. You had analyzed the data before and prepared the EER diagram. Based on that you have color coded the tables in your Excel to indicate how the data needs to be normalized. Now you are ready to build the Physical database. The file is available on Canvas

Following Data Conversion rules have been decided between you and your client:

  1. For some Sales Representatives who had joined the company a long time back, there is no hire date on record
  2. Some companies buy direct without any Sales Representative getting involved
  3. It is company audit policy to have a single date and time stamp for all database records.
  4. Surrogate keys as Primary Keys and related Foreign keys need to be created as needed.

Complete the following steps:

Question 1 - Create the schema and tables. Load the data using the excel provided. Since data volume is low, you do not need to do a VLOOKUP – you can visually find values and enter them as needed.                                                                        [14]

1-A         Attach images of the SQL create statements for each of your three tables.                            

1-B         Display all the data in your 3 tables. Screen print should show both your SQL statement and the result for each.                                                                                                                                                                             

Question 2 - Write analytical queries as required by your client. Paste the SQL statement for each of the queries and the corresponding output of records to the word document.


2-A – LookntheMirror Cosmetics needs you to create a query to find out how much quantity each cosmetic is selling. Create a query to find the total sale qty subtotaled by CosmeticName.


2-B – LookntheMirror Cosmetics needs you to create a query to display the details of what sales a particular sales person Jeff Roseman has generated. Fields to display: SalesOrderNo, SaleDate, Customer, CosmeticName, SaleQty, TotalSales and SalesRepName.


2-C – LookntheMirror Cosmetics needs you to create a query to display the details of products that contain any conditioner. Fields to display: SalesOrder, SaleDate, Customer, CosmeticName, SaleQty, TotalSales


2-C – LookntheMirror Cosmetics needs you to create a query to display the details of products sold by Rita Thomas for which no payment has been received yet. Fields to display : SalesOrder, SaleDate, Customer, CosmeticName, SaleQty, TotalSales.


                                                                                                                                                                                                                [3 + 3 + 3 + 3]

Part 2 - MongoDB


Launch MongoDB Compass and connect to the Atlas. Navigate to the “worldmovies” collection.

Complete the queries requirements from below. For 1 and 2, attach a zoomed image of your query with the Options expanded and the results displayed on the first screen.


Question 3 - Display all movies made from 2012 to 2016 with imdbRating more than 6 sorted decreasing by their ratings.                                                                                                                                                                                                      [2]

Question 4 - Display the title, year, cast, director, and awards for all movies that were nominated for or won an Oscar in 2014.                                                                                                                                                                                          
119 so 4 A H 1 2 SalesOrdern SaleDate Customer CosmeticName Selling Price SaleQty TotalSales PaymentReceive SalesRepNam Hire 

(19 2 SalesOrderN SaleDate Customer CosmeticName SellingPrice SaleQty TotalSales PaymentReceive( SalesRepNam Hire Date Lieff Roseman Jeff Roseman Rita Thomas 2/1/2021 SevenTwelve Store Shampoo 2/1/2021 SevenTwelve Store Hair Gel 4/1/2021 wrightAid Store 4/3/2021 Moonoco Store 4/12/2021 TinyMart Store 4/13/2021 Megamart 4/20/2021 Moonoco Store 190.00 YES 70.00 IYES 6001 9.50 201 $ 10 $ 15 S 4 6002 7.00 Shampoo with Conditioner $ Deodorant Hair Gel Deodorant 150.00 YES 10/4/2011 10/4/2011 600) 10.00 6004 6005 6 5.00 25 $ 125.00 Rita Thomas 7. 7.00 Shari Timmons 15 $ sol s 105.00 6006 5.00 250.00 9 6007 Hair Gel with Conditioner 8.00 40 S 320.00 10 11 Gabriel Martin 23/03/2021

Step by Step Solution

3.42 Rating (155 Votes )

There are 3 Steps involved in it

Step: 1

Answer 1A SQL CREATE STATEMENTS Table 1 SalesOrders CREATE TABLE SalesOrders OrderNo INT NOT NULL PRIMARY KEY SaleDate DATETIME NOT NULL Customer VARC... 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

Corporate Finance

Authors: Stephen Ross, Randolph Westerfield, Jeffrey Jaffe

10th edition

978-0077511388, 78034779, 9780077511340, 77511387, 9780078034770, 77511344, 978-0077861759

More Books

Students explore these related Finance questions