Assignment: Create a database for a small e-commerce web site. As a minimum, it should include...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Assignment: Create a database for a small e-commerce web site. As a minimum, it should include the following entities as a starting point: Customer - name, address, city, state, zip, etc. Inventory - description, category, quantity on hand, unit price, etc. Order - date, payment info, etc. Order Detail - typical shopping cart line items Supplier - vendor info (name, address, etc.) plus MainPhone, SalesPhone, ShippingPhone, and BillingPhone StateFees - list of 50 states and the sales tax and shipping costs Notes: Inventory and Supplier start out as a N:M, so you'll need to fix that There is a multi-column issue that needs to be fixed The fee info is: 1) Charge 6.25% tax in Texas 2) Charge 8.25% tax in California, 3) All other states have 0% tax.... and 4) Charge $4 to ship to TX, LA, OK, NM, 5) Charge $8 to ship to AK and HI, and 6) Charge $6 shipping to all other states. Real databases do not always allow you delete records, so please account for this in your table design Use the database diagram to ensure that there are no "orphan" tables Use roles and permissions to avoid unauthorized access or modification of data As a minimum, you must create Views, Table Functions, or Scalar Functions for the following: query to calculate the extended price (a single value) for a given Order and a given Line Item query to show all order activity details for a given Customer query to calculate the line-item subtotal (sum of the extended prices as a single value) for a given Order query to show the customer's name and the total cost (cost of items + tax + shipping) for a given order query to show the total sales (in $) for each month query to show the total sales (in $) for each category of product create a to dem strate the use of the above You need to have enough sample data in your database to be able to demonstrate that each query works Here are some hints about the Term Project The tables and columns shown are just a starting point... you must add/delete/rename as you see fit What are the rules/recommendations for picking/adding a column for a PK? Inventory and Supplier start out as a N:M. So, how do you fix that? Does that mean that you'll need another table? Is there a multi-column issue in Supplier? So, how many tables will there be after solving N:M and multi-column? I would use one table for state fees that contain both sales tax and shipping (not two separate tables) The phrase "given a" implies that you need to pass a parameter. So, what does that mean for a choice between View and Function? Can I pass more than one parameter? For example an order number and a line number What does it mean if a query returns a single value (and not rows of data)? How can you calculate the sum of the costs of all line items in a given order The phrase "for each" implies that you want to group the answers. So, what does that mean for a choice of keywords in the SQL statement? You'll need at least 2 months of sales data and 2 categories of products in order to demonstrate some of the queries A single order should be capable of having more than just 1 item You should consider using the Month() function to extract the month from a date How any scalar functions will there be?... How many table functions?... How many Views? What do you have to do to be able to "retire" a row instead of deleting a row? Please use the database diagram to make sure that you don't have any orphan tables Assignment: Create a database for a small e-commerce web site. As a minimum, it should include the following entities as a starting point: Customer - name, address, city, state, zip, etc. Inventory - description, category, quantity on hand, unit price, etc. Order - date, payment info, etc. Order Detail - typical shopping cart line items Supplier - vendor info (name, address, etc.) plus MainPhone, SalesPhone, ShippingPhone, and BillingPhone StateFees - list of 50 states and the sales tax and shipping costs Notes: Inventory and Supplier start out as a N:M, so you'll need to fix that There is a multi-column issue that needs to be fixed The fee info is: 1) Charge 6.25% tax in Texas 2) Charge 8.25% tax in California, 3) All other states have 0% tax.... and 4) Charge $4 to ship to TX, LA, OK, NM, 5) Charge $8 to ship to AK and HI, and 6) Charge $6 shipping to all other states. Real databases do not always allow you delete records, so please account for this in your table design Use the database diagram to ensure that there are no "orphan" tables Use roles and permissions to avoid unauthorized access or modification of data As a minimum, you must create Views, Table Functions, or Scalar Functions for the following: query to calculate the extended price (a single value) for a given Order and a given Line Item query to show all order activity details for a given Customer query to calculate the line-item subtotal (sum of the extended prices as a single value) for a given Order query to show the customer's name and the total cost (cost of items + tax + shipping) for a given order query to show the total sales (in $) for each month query to show the total sales (in $) for each category of product create a to dem strate the use of the above You need to have enough sample data in your database to be able to demonstrate that each query works Here are some hints about the Term Project The tables and columns shown are just a starting point... you must add/delete/rename as you see fit What are the rules/recommendations for picking/adding a column for a PK? Inventory and Supplier start out as a N:M. So, how do you fix that? Does that mean that you'll need another table? Is there a multi-column issue in Supplier? So, how many tables will there be after solving N:M and multi-column? I would use one table for state fees that contain both sales tax and shipping (not two separate tables) The phrase "given a" implies that you need to pass a parameter. So, what does that mean for a choice between View and Function? Can I pass more than one parameter? For example an order number and a line number What does it mean if a query returns a single value (and not rows of data)? How can you calculate the sum of the costs of all line items in a given order The phrase "for each" implies that you want to group the answers. So, what does that mean for a choice of keywords in the SQL statement? You'll need at least 2 months of sales data and 2 categories of products in order to demonstrate some of the queries A single order should be capable of having more than just 1 item You should consider using the Month() function to extract the month from a date How any scalar functions will there be?... How many table functions?... How many Views? What do you have to do to be able to "retire" a row instead of deleting a row? Please use the database diagram to make sure that you don't have any orphan tables
Expert Answer:
Related Book For
Concepts of Database Management
ISBN: 978-1285427102
8th edition
Authors: Philip J. Pratt, Mary Z. Last
Posted Date:
Students also viewed these databases questions
-
Telecom manufactures electronic components for computers. One measure it uses to monitor the quality of its distribution process is the number of customer invoice errors. The distribution center...
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
For 2020, cost of goods available for sale for Blossom Corporation was $5500000. The gross profit rate on sales was 25% Sales for the year were $5000000. What was the amount of the ending inventory?...
-
You have just invested in a portfolio of three stocks. The amount of money that you invested in each stock and its beta are summarized below. Calculate the beta of the portfolio and use the capital...
-
Show me the steps to solve Janice Morgan, age 2 4 , is single and has no dependents. She is a freelance writer. In January 2 0 2 3 , Janice opened her own office. She called her business Writers...
-
The accountant for Flenderson Roofing, Inc., posted adjusting entries (a) through (e) to the accounts at December 31, 2010. Selected balance sheet accounts and all the revenues and expenses of the...
-
Comparative balance sheets for 2013 and 2012, a statement of income for 2013, and additional information from the accounting records of Red, Inc., are provided below. Additional information from the...
-
The separation ownership and management gives rise to agency problems. Does the financial manager have a greater responsibility or a lesser responsibility for maintaining ethical corporate...
-
Reverend Peter Wilson qualifies as a minister for income tax purposes. He receives a $75,000 annual salary and a $32,000 housing allowance. He pays $24,000 (including utilities) per year for the...
-
Summarize the project of the Initiative to improve police training for interaction with people with mental illness in a letter of intent that persuades the organization to request a full proposal.
-
What was "rational management"? Why is this important for us to consider whenever we discuss the brutal response the formerly enslaved inflicted on their oppressors
-
How does Pierre Bourdieu's concept of cultural capital explain the role of education in perpetuating social inequality, and what measures could be implemented to reduce these effects within...
-
a. Discuss the benefits that will accrue to a country enjoying a high economic growth rate? b. What are the limitations to high economic growth rates?
-
Addressing the need for institutions that support workers willing to fill the demand for long-term employment in low-skill jobs and ensuring they receive a living wage is crucial for creating fair...
-
What are some key fixed and variable costs for Acceptance Insurance? Remember, fixed costs do not change when output changes. That is, fixed costs remain even if the company is producing nothing....
-
Preview Activity 2.6.1. The equation y =(x-32) relates a temperature given in x degrees Fahrenheit to the corresponding temperature y measured in degrees Celcius. a. Solve the equation y = (x-32) for...
-
Write a paper by answer the following question: Should Recycling Be Mandatory?
-
In the following exercises, you will use the data in the Solmaris Condominium Group database shown in Figures 1-21 through 1-25 in Chapter 1. (If you use a computer to complete these exercises, use a...
-
Describe the purpose of the INTERSECT command in relational algebra.
-
What is an un-normalized relation? Is it a relation according to the definition of the word relation?
-
What is a best practice in general? Give examples of best practices in an area unrelated to project management, such as nutrition, exercise, or child rearing.
-
What are some unique features of project management software in general?
-
Why should organizations identify and use best practices? What are the main categories of best practices developed as part of OPM3?
Study smarter with the SolutionInn App