Skip to content

Created an efficient database for food delivery system that can insert and retrieve data. Modelled database by ER Diagram and converted to relationship model using SQL. You can perform queries to retrieve data from database using SQL.

Notifications You must be signed in to change notification settings

Dudam-Neeraj-Dattu/Food-Delivery-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Food Delivery System

  • Created an efficient database for food delivery system that can insert and retrieve data from the database in efficient way.

  • The following image is the Entity Relationship Diagram prepared for making this database.

ER

  • The following image is the Relational Model converted from ER Diagram using SQL.

Relational

  • You can perform queries and retrieve data from the database using SQL.

  • Used MS SQL Server and Microsoft SQL Server Management Studio for creating the database.

  • Read the Documentation for the Database Design for detailed explaination.

  • Following are some Examples of queries and retrieved data from database.

Query 1

The following query retrievs data from database by doing INNER JOIN and displays Hotel_Name, Item_Price, Item_Name joining three tables Hotel, Hotel_Items, Items.

SELECT Hotel_Name, Item_Price, Item_Name FROM Items i INNER JOIN Hotel_Items hi ON hi.Item_id = i.Item_id INNER JOIN Hotel h ON hi.Hotel_id = h.Hotel_id ORDER BY Item_Name

Query_1

Query 2

The following query retrievs data from database by doing INNER JOIN and done a multiply operation to display amount and displays Date_of_Order, Customer_Name, Item_Name, Quantity, Amount joining four tables Order_Items, Customer, Items, Hotel_Items.

SELECT Date_of_Order, Name, Item_Name, Quantity, Hotel_Name, (Quantity * Item_Price) AS Amount FROM Order_Items oi INNER JOIN Customer c ON oi.Customer_id = c.Customer_id INNER JOIN Items i on oi.Item_id = i.Item_id INNER JOIN Hotel_Items hi ON oi.Item_id = hi.Item_id AND oi.Hotel_id = hi.Hotel_id INNER JOIN Hotel hn ON oi.Hotel_id = hn.Hotel_id

Query_2

About

Created an efficient database for food delivery system that can insert and retrieve data. Modelled database by ER Diagram and converted to relationship model using SQL. You can perform queries to retrieve data from database using SQL.

Topics

Resources

Stars

Watchers

Forks

Languages