The Food Delivery Database Management System is a NoSQL database project developed using MongoDB. This project simulates a modern online food delivery platform where customers can browse restaurants, order food, make payments, and receive deliveries through riders.
The project is designed for students, beginners, and developers who want to learn MongoDB database design and implementation through a real-world application. It demonstrates proper database modeling, collection relationships, CRUD operations, aggregation pipelines, and report generation.
The main objectives of this project are:
- Design a complete food delivery database using MongoDB.
- Implement a real-world NoSQL database structure.
- Store and manage customer, restaurant, order, payment, and rider information.
- Perform CRUD operations efficiently.
- Generate useful business reports.
- Practice aggregation pipelines and data analysis.
- Understand document-based database architecture.
- Develop hands-on experience with MongoDB Compass and Mongo Shell.
✅ Complete MongoDB Database Project
✅ 6 Interconnected Collections
✅ Realistic Food Delivery Data
✅ Customer Management
✅ Restaurant Management
✅ Menu Item Management
✅ Order Tracking System
✅ Payment Processing Records
✅ Rider Management System
✅ MongoDB Aggregation Pipelines
✅ Report Generation
✅ MongoDB Compass Compatible
✅ Beginner-Friendly Structure
The Food Delivery System consists of six major entities:
Stores customer information, contact details, city, and spending history.
Stores restaurant details including ratings, cuisine types, and delivery fees.
Contains food products available for customers to order.
Maintains all order transactions and delivery statuses.
Stores payment methods, payment amounts, and transaction statuses.
Manages delivery personnel information and earnings.
Stores customer information.
{
"_id": ObjectId(),
"name": "Ali Khan",
"email": "ali@gmail.com",
"phone": "03001234567",
"city": "Lahore",
"total_spent": 2500
}| Field | Description |
|---|---|
| _id | Unique Customer ID |
| name | Customer Name |
| Customer Email | |
| phone | Contact Number |
| city | Customer City |
| total_spent | Total Amount Spent |
Stores restaurant details.
{
"_id": ObjectId(),
"name": "Biryani House",
"cuisine": "Pakistani",
"rating": 4.8,
"delivery_fee": 150,
"is_open": true
}| Field | Description |
|---|---|
| _id | Restaurant ID |
| name | Restaurant Name |
| cuisine | Cuisine Type |
| rating | Customer Rating |
| delivery_fee | Delivery Charges |
| is_open | Availability Status |
Stores available food items.
{
"_id": ObjectId(),
"name": "Chicken Biryani",
"category": "Main Course",
"price": 650,
"restaurant": "Biryani House"
}| Field | Description |
|---|---|
| _id | Menu Item ID |
| name | Food Item Name |
| category | Food Category |
| price | Food Price |
| restaurant | Restaurant Name |
Stores customer orders.
{
"_id": ObjectId(),
"customer_name": "Ali Khan",
"restaurant_name": "Biryani House",
"items": [
"Chicken Biryani",
"Cold Drink"
],
"status": "Delivered",
"grand_total": 800
}| Field | Description |
|---|---|
| _id | Order ID |
| customer_name | Customer Name |
| restaurant_name | Restaurant Name |
| items | Ordered Food Items |
| status | Current Status |
| grand_total | Final Amount |
Stores payment records.
{
"_id": ObjectId(),
"method": "Cash",
"amount": 800,
"status": "Paid"
}| Field | Description |
|---|---|
| _id | Payment ID |
| method | Payment Method |
| amount | Payment Amount |
| status | Payment Status |
Stores rider information.
{
"_id": ObjectId(),
"name": "Usman Ali",
"vehicle": "Bike",
"status": "Available",
"earnings": 12000
}| Field | Description |
|---|---|
| _id | Rider ID |
| name | Rider Name |
| vehicle | Vehicle Type |
| status | Availability Status |
| earnings | Total Earnings |
CUSTOMERS
│
▼
ORDERS
│
├────────► PAYMENTS
│
▼
RESTAURANTS
│
▼
MENU ITEMS
RIDERS
│
▼
ORDERS
| Relationship | Type |
|---|---|
| Customer → Orders | One-to-Many |
| Order → Payment | One-to-One |
| Restaurant → Orders | One-to-Many |
| Restaurant → Menu Items | One-to-Many |
| Rider → Orders | One-to-Many |
| Collection | Documents |
|---|---|
| Customers | 10 |
| Restaurants | 10 |
| Menu Items | 15 |
| Orders | 10 |
| Payments | 10 |
| Riders | 5 |
- Total Revenue: ₨ 8,500+
- Delivered Orders: 7
- Preparing Orders: 2
- Out For Delivery Orders: 1
- Active Customers: 10
- Available Riders: 5
- Restaurants Across Multiple Cities
- Multiple Food Categories Available
FoodDelivery-Database/
│
├── README.md
│
├── data/
│ ├── customers.json
│ ├── restaurants.json
│ ├── menuitems.json
│ ├── orders.json
│ ├── payments.json
│ └── riders.json
│
├── queries/
│ ├── find_queries.txt
│ ├── update_queries.txt
│ ├── delete_queries.txt
│ └── aggregate_queries.txt
│
├── reports/
│ ├── revenue_report.txt
│ ├── customer_analysis.txt
│ ├── payment_analysis.txt
│ ├── restaurant_analysis.txt
│ └── order_status_report.txt
│
│
├── documentation/
│ └── project_documentation.pdf
│
└── LICENSE
Download MongoDB Community Server:
https://www.mongodb.com/try/download/community
Install using the default settings.
Download MongoDB Compass:
https://www.mongodb.com/products/compass
Install and launch MongoDB Compass.
Connection String:
mongodb://localhost:27017
Click Connect.
use FoodDeliveryDBUsing MongoDB Compass:
- Create Collection
- Click Add Data
- Select Import JSON
- Choose File
- Import Data
Repeat for all collections.
db.customers.find({
city: "Lahore"
})db.orders.find({
status: "Delivered"
})db.riders.find({
status: "Available"
})db.restaurants.find({
rating: {
$gte: 4.5
}
})db.orders.aggregate([
{
$group:{
_id:"$restaurant_name",
totalRevenue:{
$sum:"$grand_total"
}
}
}
])db.customers.aggregate([
{
$group:{
_id:"$city",
totalSpent:{
$sum:"$total_spent"
}
}
}
])db.payments.aggregate([
{
$group:{
_id:"$method",
count:{
$sum:1
}
}
}
])This project demonstrates:
- MongoDB Fundamentals
- NoSQL Database Design
- Collections and Documents
- CRUD Operations
- Aggregation Pipelines
- Data Modeling
- Database Relationships
- Report Generation
- Database Analysis
- Real-World Database Development
This project can be used for:
- University Database Projects
- Advanced Database Lab Submission
- MongoDB Practice
- GitHub Portfolio
- Internship Applications
- Entry-Level Developer Portfolio
- Database Administrator Learning
- NoSQL Development Practice
- MongoDB
- MongoDB Compass
- JSON
- JavaScript Queries
- NoSQL Database Architecture
Contributions are welcome.
- Fork the repository
- Create a new branch
- Commit your changes
- Push to your branch
- Open a Pull Request
This project is licensed under the MIT License.
Muhammad Umar
ADP Computer Science Student
Advanced Database Management System Project
If you found this project useful:
⭐ Star the repository
🍴 Fork the repository
📢 Share with friends
💡 Suggest improvements
🍔 Food Delivery Database Management System 🚀
Built with MongoDB for Learning and Practice.