ERD Diagram, Project, Using MySQL

profileNikita23
project_outline-fall20201.docx

BUSA 326

Fall 2020

Project

Congratulations, you have been hired by a wine distribution company in Dallas. They have provided you with the information about the wine and the orders from their customers. They are interested in answers to the questions, but as a good database developer you are as concerned with organizing and making the SQL code neat.

The data and definitions are below. The questions might be adjusted per lectures. But no later than 2 weeks before the due date of the project.

Information about the wine

WINE

Retail Price/bottle

Cost / bottle

Bottles / Case

Initial Inventory (bottles)

Basic White

$9.5

$8

12

2500

White Premium

$14.75

$12

6

2500

Basic Red

$9.00

$8

12

2600

Intermediate Red

$11.00

$9.5

12

2500

Premium Red

$13.00

$11.5

6

2500

Dessert Wine

$18.00

$16.00

6

2500

Sparkling

$12.55

$11.00

6

2500

The Best Italian Food Restaurant

2325 6th St Fort Worth

817-232-1345

2019 Invoice Summary

(Cases)

Month

White Basic

White Premium

Basic Red

Intermediate Red

Premium Red

Dessert Wine

Sparkling

Jan

2

1

2

4

2

0

1

Feb

3

3

3

2

0

0

Mar

1

1

4

3

2

1

0

April

2

3

4

2

2

0

May

1

4

3

1

1

1

June

3

3

4

2

1

1

July

2

1

3

5

2

0

1

August

1

5

5

2

0

1

Sept

1

3

5

1

0

1

Oct

2

2

3

5

2

1

2

Nov

4

6

6

2

1

2

Dec

3

3

6

1

1

2

The Seafood Joint

1900 7th St Fort Worth

817-231-9999

2019 Invoice Summary

(Cases)

Month

White Basic

White Premium

Basic Red

Intermediate Red

Premium Red

Dessert Wine

Sparkling

Jan

2

2

Feb

2

2

Mar

2

3

April

2

4

May

3

3

June

3

2

July

3

3

August

3

5

Sept

2

4

Oct

3

3

Nov

2

2

Dec

3

1

Ralphs food and wine

5523 Camp bowie Road Dallas, Tx

817-229-4568

2019 Invoice Summary

(Cases)

Month

White Basic

White Premium

Basic Red

Intermediate Red

Premium Red

Dessert Wine

Sparkling

Jan

1

1

Feb

1

1

Mar

2

1

April

May

1

June

1

1

July

August

1

1

Sept

Oct

1

1

Nov

1

1

Dec

1

The Wine Shop

123 Main Street, Commerce, Tx

321-999-4528

2019 Invoice Summary

(Cases)

Month

White Basic

White Premium

Basic Red

Intermediate Red

Premium Red

Dessert Wine

Sparkling

Jan

1

1

Feb

1

2

2

3

Mar

3

1

April

2

1

May

2

4

June

1

July

August

1

2

1

3

Sept

1

1

Oct

1

2

1

2

1

Nov

Dec

1

1

The little Hotel

101 Main Street, Grapevine Tx

817-443-4192

2019 Invoice Summary

(Cases)

Month

White Basic

White Premium

Basic Red

Intermediate Red

Premium Red

Dessert Wine

Sparkling

April

1

1

1

1

1

1

1

May

1

June

2

4

1

2

2

1

2

July

3

3

1

3

1

4

August

5

2

1

3

3

4

Sept

5

3

1

3

4

Oct

5

2

1

4

1

1

4

Nov

5

1

1

3

1

1

5

Dec

5

1

1

3

1

4

Build out the ERD diagrams for the entire solution based on the following questions (you must have at least 3 tables for full credit, there is no limit based on your simplification of the data. The simplification of the data should follow the in-class examples of data, with no duplication in tables)

Provide

I. The MYSQL code (within the word document) to build the database and tables

II. The MYSQL code (within the word document) to answer each of the following questions

III. Provide screen shots answering each question along with any supporting text

The answers must be done in SQL, not table presentation and manual interpretation of the data

Questions :

1. What is the total revenue for the year?

2. What is the gross profit for the year? (based only on what is in the tables)

3. How much revenue did each wine provide for the year?

4. What is the Average revenue per month per location for the year?

5. What is the final inventory of the Premium Red wine?

6. If the retail price of the wine increases by 10%, what is the gross profit margin ?

7. How many bottles of the different wines were ordered in July?

8. What is the revenue per year per restaurant?