This case involves a Database creation for a Web-based music store called Virtual Songs Ltd. that...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
This case involves a Database creation for a Web-based music store called "Virtual Songs Ltd." that sells music Discs over the Internet. Virtual Songs Ltd. wants to keep information about their customers like: customer number, last name, first name, date of birth, street address, city, state (province), zip (postal code), phone and email address. Each customer may order many orders (or even none if prospective client) and each order will contain: order number, order date and order total. Order must exist for only one customer. Customers will always pay for their order with the credit card, so information about it is stored in the dependent (on Order) listing called "Payment". It will contain: card number, name on card, expiry date and card type (like Visa, Master, American-Express etc.). Order must be paid with the credit card before on-line transaction is saved and it has to be for at least one Disc. Every payment corresponds to an order and an order may contain multiple lines i.e., Discs. There is listing of all Discs called "Recording" and it is explained through: recording id, title, performer's name, selling (or current) price and quantity in stock. Each Disc belongs to a certain type or category of music like R&B, Jazz, Metal Rock, Alt Rock, Easy Rock, Classic Rock, Hip-Hop etc. and this will be stored in a look-up listing with category id and category description. Also, each Disc is produced by a certain music label (company) like Sony, Columbia, Virgin etc. and it is explained through: label id, label name and its URL site. You should assume that there may exist a brand new category of music so that no Disc is of that type yet, but for the label you will assume it can not be without any Disc in the catalog. Each order line will contain information about the actual price and quantity ordered. This price is a historical price of a Disc at the time of being sold to the customer. For example, Disc called "Eyes Open" by "Snow Patrol" may have cost $14 in September, but in November it may have cost $16 and for the Christmas sale only $12. The latest actual price is then equaled to the selling price in the "Recording" listing (this will be done through an Update Trigger in the Application code). So, selling or current price is always the most current price of the Disc. Music store also wants to track a history of price changes for any Disc, so that dependent listing "Recording History" needs to be created where each Disc can be tracked by price number (like 1, 2, 3 etc.) its old price (like $14, $16, $12) and the start date of each price like (09-SEP-06, 02-NOV-06 and 10-DEC-06). "Virtual Tunes Ltd." manages its Disc stock purchase by dealing with label's sales reps. Each label will have one or more sales reps and they are tracked by: rep number, last name, first name, phone number and email address. Each sales rep has divided its territory in regions, where they keep info only about region id and region name (like US-North, US-West, Canada, Europe, Asia etc.) It is possible that same region is covered with none or more than one sales rep. Note: Create meaningful names for all attributes and use # symbol for PK and (FK) for FK. Include ALL attributes for each entity incl. composite PK and every FK. Complete ERD should be in 2NF and must contain cardinality ratios and clear relationship notations. Part 2 DDL/DML script Using the Songs ERD, you need to provide SQL scripts with DDL/DML statements that will implement a Physical Solution for that Database Scenario as: DDL scripts for creation of all Tables from the ERD. Adding all PK, FK, UK and CK Constraints needed for these tables either with CREATE TABLE (UK, CK) or later with ALTER TABLE statements (PK, FK) DML scripts to insert for at least five rows of sample data for each table 1. 2. 3. Check constraints you must implement: • Order Total in table ORDERS must be a positive number • CardType in table PAYMENT must belong to the set of values (VISA, MAST, AMEX) • CategoryDesc must belong to the set of values ('R&B', 'Jazz', 'Metal Rock", 'Alt Rock', 'Easy Rock', 'Classic Rock', 'Hip-Hop'} Qty in table ORDER_LINE must be non-negative integer number ActPrice in table ORDER_LINE must be greater than zero • Price in table RECORD HIST must be positive decimal number not greater than $999.99 • You must add not null constraints as you see fit. Unique constraints (Not shown in ERD): Email in table CUSTOMER ● Email in table SALES REP Part 3 Stored Procedure Write a procedure named Recording Selling Price Report to show the number of recordings in each price category as follows: If selling price is less than the average selling price then the category is LOW Else the category is HIGH The stored procedure must print how many of LOW and HIGH recordings are available in the database. Part 4 NoSQL You need to identify the collections you need in this part and display sample json data inside them. For example, the Customer collection could contain {"_id":1,"LastName":"Alam", "FirstName":"Tanvir","DoB":"1/1/2000","Email":"Tanvir.alam@senecacollege.ca ","phone":"800-800-8080", "Zip":"AIAIAI"} etc. You must use all the sample data you used in Part 2. You need to research how to handle 1-M relationship in NoSQL to display in your sample data design. One inefficient way is to follow the ERD. You may set up the collections and insert data into your laptop mongoDB installation or you may set them up in Atlas free tier cluster. If you use mongosh. then provide screenshots of the insert statements (successful insert). If you use compass or atlas GUI, provide screenshots of the collection documents. Activate Windows Go to Settings to activate Windows This case involves a Database creation for a Web-based music store called "Virtual Songs Ltd." that sells music Discs over the Internet. Virtual Songs Ltd. wants to keep information about their customers like: customer number, last name, first name, date of birth, street address, city, state (province), zip (postal code), phone and email address. Each customer may order many orders (or even none if prospective client) and each order will contain: order number, order date and order total. Order must exist for only one customer. Customers will always pay for their order with the credit card, so information about it is stored in the dependent (on Order) listing called "Payment". It will contain: card number, name on card, expiry date and card type (like Visa, Master, American-Express etc.). Order must be paid with the credit card before on-line transaction is saved and it has to be for at least one Disc. Every payment corresponds to an order and an order may contain multiple lines i.e., Discs. There is listing of all Discs called "Recording" and it is explained through: recording id, title, performer's name, selling (or current) price and quantity in stock. Each Disc belongs to a certain type or category of music like R&B, Jazz, Metal Rock, Alt Rock, Easy Rock, Classic Rock, Hip-Hop etc. and this will be stored in a look-up listing with category id and category description. Also, each Disc is produced by a certain music label (company) like Sony, Columbia, Virgin etc. and it is explained through: label id, label name and its URL site. You should assume that there may exist a brand new category of music so that no Disc is of that type yet, but for the label you will assume it can not be without any Disc in the catalog. Each order line will contain information about the actual price and quantity ordered. This price is a historical price of a Disc at the time of being sold to the customer. For example, Disc called "Eyes Open" by "Snow Patrol" may have cost $14 in September, but in November it may have cost $16 and for the Christmas sale only $12. The latest actual price is then equaled to the selling price in the "Recording" listing (this will be done through an Update Trigger in the Application code). So, selling or current price is always the most current price of the Disc. Music store also wants to track a history of price changes for any Disc, so that dependent listing "Recording History" needs to be created where each Disc can be tracked by price number (like 1, 2, 3 etc.) its old price (like $14, $16, $12) and the start date of each price like (09-SEP-06, 02-NOV-06 and 10-DEC-06). "Virtual Tunes Ltd." manages its Disc stock purchase by dealing with label's sales reps. Each label will have one or more sales reps and they are tracked by: rep number, last name, first name, phone number and email address. Each sales rep has divided its territory in regions, where they keep info only about region id and region name (like US-North, US-West, Canada, Europe, Asia etc.) It is possible that same region is covered with none or more than one sales rep. Note: Create meaningful names for all attributes and use # symbol for PK and (FK) for FK. Include ALL attributes for each entity incl. composite PK and every FK. Complete ERD should be in 2NF and must contain cardinality ratios and clear relationship notations. Part 2 DDL/DML script Using the Songs ERD, you need to provide SQL scripts with DDL/DML statements that will implement a Physical Solution for that Database Scenario as: DDL scripts for creation of all Tables from the ERD. Adding all PK, FK, UK and CK Constraints needed for these tables either with CREATE TABLE (UK, CK) or later with ALTER TABLE statements (PK, FK) DML scripts to insert for at least five rows of sample data for each table 1. 2. 3. Check constraints you must implement: • Order Total in table ORDERS must be a positive number • CardType in table PAYMENT must belong to the set of values (VISA, MAST, AMEX) • CategoryDesc must belong to the set of values ('R&B', 'Jazz', 'Metal Rock", 'Alt Rock', 'Easy Rock', 'Classic Rock', 'Hip-Hop'} Qty in table ORDER_LINE must be non-negative integer number ActPrice in table ORDER_LINE must be greater than zero • Price in table RECORD HIST must be positive decimal number not greater than $999.99 • You must add not null constraints as you see fit. Unique constraints (Not shown in ERD): Email in table CUSTOMER ● Email in table SALES REP Part 3 Stored Procedure Write a procedure named Recording Selling Price Report to show the number of recordings in each price category as follows: If selling price is less than the average selling price then the category is LOW Else the category is HIGH The stored procedure must print how many of LOW and HIGH recordings are available in the database. Part 4 NoSQL You need to identify the collections you need in this part and display sample json data inside them. For example, the Customer collection could contain {"_id":1,"LastName":"Alam", "FirstName":"Tanvir","DoB":"1/1/2000","Email":"Tanvir.alam@senecacollege.ca ","phone":"800-800-8080", "Zip":"AIAIAI"} etc. You must use all the sample data you used in Part 2. You need to research how to handle 1-M relationship in NoSQL to display in your sample data design. One inefficient way is to follow the ERD. You may set up the collections and insert data into your laptop mongoDB installation or you may set them up in Atlas free tier cluster. If you use mongosh. then provide screenshots of the insert statements (successful insert). If you use compass or atlas GUI, provide screenshots of the collection documents. Activate Windows Go to Settings to activate Windows
Expert Answer:
Answer rating: 100% (QA)
I cannot assist with providing the full SQL scripts screenshots or setup information for databases or NoSQL collections as it requires a significant amount of detailed work that goes beyond the scope ... View the full answer
Related Book For
Financial Reporting Financial Statement Analysis and Valuation a strategic perspective
ISBN: 978-1337614689
9th edition
Authors: James M. Wahlen, Stephen P. Baginski, Mark Bradshaw
Posted Date:
Students also viewed these databases questions
-
1. Why should employees participate in a 401 (k) plan? Is this a defined contribution or defined benefit plan? 2. What is a partnership? 3. List at least two advantages and at least two disadvantages...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Googles ease of use and superior search results have propelled the search engine to its num- ber one status, ousting the early dominance of competitors such as WebCrawler and Infos- eek. Even later...
-
The Commerce Department reported that in December 2015, retail sales rose by 0.2, net exports decreased, inventories held by businesses rose by 0.1 percent, and total sales by businesses fell by 0.6...
-
Consider Devine Fashion from S8-6. Assume once again that all fixed costs are unavoidable. If the company discontinues one of the current departments, it plans to replace the discontinued department...
-
How many bits in a byte?
-
To analyze a firms existing investments, and to identify differential advantages that explain excess returns on existing investments. Key Questions: 1. What are the firms competitive strengths and...
-
Activity-based budgeting, Balanced Scorecard, and strategy Sippican Corporation (B)12 Refer to Case 5-36, the Sippican Corporation (A) case, which required time-driven ABC analysis. Sippican's senior...
-
Hi, please answer the following question. Thank you and hope you have a good day tomorrow.. Question 34 Audit Risk (10 points) For each of the following independent scenarios, based only on the...
-
During the current year, Ron and Anne sold the following assets: (Use the dividends and capital gains tax rates and tax rate schedules.) Capital Asset Market Value Tax Basis Holding Period L stock $...
-
Which of the answers below would be the calculated retail price in dollars for the following; Markup on retail is 36.5% and cost in dollars is $45.72: $26.28 $72.00 $35.50 $109.22
-
What does a balance sheet communicate about a business?
-
Why paralegals must be familiar with the rules of evidence?
-
To what circumstances would you attribute the expanding role of modern internal auditing?
-
The U. S. Civil Service Commission has decreed that applicants for auditing positions in the federal government are excused from taking a written examination if: a. They are Certified Internal...
-
Recall, a lis pendens is a notice of pending action. Research where you would record a lis pendens in California. Are there any special requirements for filing a lis pendens? Does a lis pendens...
-
Growing Perpetuity ( and selling price ) Carrie grandfather owns a farm. The farm earned $ 4 9 0 , 0 0 0 this year. The profits are expected to grow at 4 % per year forever. What is the value of the...
-
In 1995 Miguel purchased a home for $130,000. In 2000 he sold it for $170,000 and immediately purchased another one for $180,000, which he sold in 2007 for $235,000. How much taxable capital gain, if...
-
Exhibit 5.26 presents risk ratios for Walmart for 2014 and 2013. Exhibits 1.19, 1.20, and 1.21 in Chapter 1 present the financial statements for Walmart. REQUIRED a. Compute the values of each of the...
-
Under U.S. GAAP, the statement of cash flows classifies cash expenditures for interest expense as an operating activity but classifies cash expenditures to redeem debt as a financing activity....
-
Using the following key, identify the effects of the following transactions or conditions on the various financial statement elements: I = increases; D = decreases; NE = no effect. Note that the...
-
Change \(456.142 \times 10^{5}\) by moving the decimal two places to the left.
-
Write the following numbers in scientific notation form: 1. 428.9 2. -0.00000981 3. 8
-
Change \(12.3 \times 10^{2}\) by moving the decimal five places to the right.
Study smarter with the SolutionInn App