Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pizzas - R - Us: The most obvious thing that needs to be tracked as part of this database system is the information about each

Pizzas-R-Us:
The most obvious thing that needs to be tracked as part of this database system is the information about
each pizza. A pizza has a crust type (thin, original, pan, gluten free) and a size (personal, medium, large, x-
large). A pizza has an associated price and cost to the company, both of which are determined by the size
of the pizza and the toppings on the pizza. A pizza can be in two states: completed by the kitchen or still
being processed by the kitchen. Each pizza can have multiple toppings. Each topping has a name, a price
to the customer, a price to the business, an amount used for each pizza size, a minimum inventory level,
and a current inventory level (which is updated whenever a pizza is ordered). The same topping can be
on many pizzas (i.e., several pizzas can have pepperoni on them). A customer can request extra of any
topping, which is always a double amount. Cheese counts as a topping (there is no free cheese in this
organization).
Pizzas belong to orders. An order can be for dine in, pickup, or delivery. An order can have multiple pizzas
on it. An order can be marked as complete once all its pizzas are complete. Each order has a total cost to
the business, which is calculated by adding up the costs of each pizza. Each order should have a
timestamp for when the food was ordered (so the kitchen can prioritize orders). Each order also has a
total price to the customer, which is calculated by adding the prices of each pizza. If an order is for a dine
in customer, then we need to know the table number. If an order is for pickup, then it needs to have a
pickup customer associated with it. That customer must have a name and a phone number. If an order is
for delivery, then it must have a delivery customer associated with it and include a name, phone number
and address. A customer can have many orders, since the information is saved for the next time they
order pizza. A customer could have some pickup orders, and some delivery orders. While other pizza
places might allow a customer to save multiple addresses, Pizzas-R-Us only allows a customer to have one
address. Note, we dont need any customer information for a dine in customer. When designing your
database, the type of order should be used as your discriminator.
Furthermore, Pizzas-R-Us offers discounts. Discounts can be applied to individual pizzas or an entire
order; although you cant apply to same discount to both a pizza and an order. Discounts have a name
and either a dollar amount off or a percentage off. A pizza or order can have multiple discounts applied to
it, and a discount can be applied to many pizzas or orders. Order discounts are applied to the entire order
after all the pizza discounts have been applied.
The pizzeria also needs to track the base prices for their pizzas. Each pizza needs a base price (to the
customer) and a base cost (to the business) based on the crust type and pizza size. To compute the price
of a pizza, you would look at the size and crust of the pizza and find the corresponding base price. To that
you would add the price for each topping on the pizza (accounting for double topping quantities). Finally,
you would apply any discounts to the pizza. To find the total for the order, you would add up the price for
each pizza, then apply any discounts that apply to the order. While the base prices and topping prices will
change over time, those changes should not be reflected in past orders. So, a pizzas price should be
calculated once and saved. To find the cost of a pizza to the business, the same process is used, with base
cost instead of base price. Discounts do not lower the cost of the order to a business.
The pizzeria is under new management and will be very closely monitoring profitability. To make this
easier to do, you will need to implement three views that support these reports. Management would like
reports (aka views) on:
Popular Toppings: rank order of all the toppings (accounting for extra toppings) from most
popular to least popular
Profit by Pizza: a summary of the profit by pizza size and crust type over a selected time period
ordered by profit from most profitable to least profitable
Profit by Order Type: a summary of the profit for each of the three types of orders by month with
a grand total over all the orders at the pizzeria
Please draw an red diagram which uses Crow foot notation and also answer the last part about view. Thank you

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions