The Online Food Delivery ER Diagram represents a food ordering and delivery system where Users can browse restaurants, place orders, and make payments. Restaurants offer Food Items, which are included in Orders placed by users. Each order has details such as the restaurant, food items, quantity, total price, and order status. Payments are linked to orders and users, tracking the amount, method, and status. The system also includes Delivery Persons who are assigned orders and handle deliveries to users. This diagram models the entire workflow, from food selection to payment and final delivery, ensuring a smooth online food ordering experience.

Edit this diagram in Gleek
Online Food Delivery diagram code in Gleek
User
UniqueIdentifier id PK "User's unique identifier"
String name "User's name"
String email UK "User's email address"
String address "User's physical address"
String phone "User's phone number"
Restaurant
UniqueIdentifier id PK "Restaurant's unique identifier"
String name "Restaurant's name"
String location "Restaurant's location"
String menu "Restaurant's menu"
FoodItem
UniqueIdentifier id PK "Food item's unique identifier"
String name "Food item's name"
Int price "Food item's price"
String ingredients "Food item's ingredients"
UniqueIdentifier restaurantId FK "Foreign key to Restaurant entity"
Order
UniqueIdentifier id PK "Order's unique identifier"
UniqueIdentifier userId FK "Foreign key to User entity"
UniqueIdentifier restaurantId FK "Foreign key to Restaurant entity"
UniqueIdentifier foodItemId FK "Foreign key to FoodItem entity"
Int quantity "Quantity of food items in the order"
Int totalPrice "Total price of the order"
String status "Status of the order"
Payment
UniqueIdentifier id PK "Payment's unique identifier"
UniqueIdentifier userId FK "Foreign key to User entity"
UniqueIdentifier orderId FK "Foreign key to Order entity"
Int amount "Payment amount"
String method "Payment method"
String status "Payment status"
DeliveryPerson
UniqueIdentifier id PK "Delivery person's unique identifier"
String name "Delivery person's name"
String phone "Delivery person's phone number"
String vehicle "Delivery person's vehicle"
User {1}-places-{1..n} Order
User {1}-receives-{1..n} Order
User {1}-makes-{1..n} Payment
Restaurant {1}-serves-{1..n} FoodItem
Restaurant {1}-receives-{1..n} Order
Restaurant {1}-prepares-{1..n} Order
FoodItem {1}-is part of-{1..n} Order
Order {1}-is delivered by-{1} DeliveryPerson
DeliveryPerson {1}-delivers-{1..n} Order
About ER diagrams
We often make an entity-relationship (ER) diagram, ERD, or entity-relationship model, in the early stages of designing a database. An ERD is perfect for quickly sketching out the elements needed in the system. The ERD explains how the elements interact. ER diagrams can be shared with colleagues. Their simplicity makes them ideal even for non-technical stakeholders.
Similar ER diagram examples
Online store entity-relationship diagram
Employee management system entity-relationship diagram
Banking system entity-relationship diagram
Online movie streaming platform entity-relationship diagram
Travel management system Er diagram
College management system ER diagram