Your company has been consulting with LookntheMirror Cosmetics over the last couple of months. It is an
Question:
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:
- For some Sales Representatives who had joined the company a long time back, there is no hire date on record
- Some companies buy direct without any Sales Representative getting involved
- It is company audit policy to have a single date and time stamp for all database records.
- 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.
Corporate Finance
ISBN: 978-0077861759
10th edition
Authors: Stephen Ross, Randolph Westerfield, Jeffrey Jaffe