urgent

IST7000 – Data Management – Week 2 ERD Diagram Definition

Name: Ashok Babu Gutta


Scenario 1 – Online Ordering and Delivery Service for Sandwich Shop Joe’s Sub Shop is starting an online ordering system that will provide local delivery within five miles of the sub shop. The customer can order a limited menu of the sandwiches the sub shop creates. The online order system will need to track the following information customer, order and product. They shop will need to know the quantity ordered, toppings and other directions for the order. The delivery drive will need to know the address and phone number of the customer.


ERD (Entity Relationship Diagram):


urgent 1

ERD for online ordering and delivery service for Joe’s sandwich shop

Entities:

It has five entities

1.Customers

2. Address

3. Orders

4. Products

5.Payments


Attributes:

Customers- customer name, customer id, phone number.

Address - Address id, place, Zip code

Orders - customer id, quantity order, prices, payment id

Products - Item number, Sandwich name, Toppings

Payment - card type, card details.


Relationships:

Customer has one address – then it is one to one relationship between customer and address.


Customer places many orders – then it is a many to many relationship between customer and order


Order has many products – then it is a one to many products between order to product


Order has one payment – then it is a one to one payment methods between order to payment.


Primary keys:

customer Id, address id, Order id, product id, payment id

Business rules:

Joe’s Sub shop can provide delivery service within 5 miles around the shop.