Question: 2. In this problem, you will design a relational schema for an online food delivery system similar to DoorDash. This service allows people to order

2. In this problem, you will design a relational schema for an online food delivery system similar to DoorDash. This service allows people to order food online, and then delivery people will deliver orders to customers. When customers are waiting for their food, they are able to check the status of their order. Customers can leave a review for an order that includes a separate rating of each food item in the delivery, a rating for the delivery itself, as well as optional comments. Each order only includes food from a single restaurant, but the order may include several food items from that restaurant. Different restaurants may have dishes with the same name, but these dishes will often have different descriptions and differ in information such as calories and serving size. Customers may receive coupons from restaurants. Each such coupon is for a fixed amount (e.g., $1.50 off), can only be used at the restaurant that issued it, and only by the customer that received it. Coupons are automatically applied to any future order at that restaurant, but have an expiration date. To simplify the design, we do not model the case of the same restaurant having several locations. Ratings for food items and for delivery are on a scale from 1 to 5. For this homework, you need to design a suitable relational schema for this scenario. Thus, you need to store information about customers (e.g., name, age, email, credit card, phone number), restaurants (e.g., name, zip code, category (e.g., Chinese, Seafood, Korean, or Italian)), food items (e.g., food name, description, price), the people doing the delivery (name, phone number), orders, and coupons.

Design a relational database schema for this online application that supports all the functionality. You should state reasonable assumptions about your schema that you find necessary. You need to specify the primary keys and foreign keys for each table.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!