Docsity

Night Canteen Management System: A Web Application Design and Database Implementation, Lab Reports of Database Management Systems (DBMS)

Toggle sidebar
bg1

Database Management Systems Lab (CO303)
Report: Night Canteen Order Management System
Derik Clive R - 15CO213
Arvind Sai K - 15CO207

Introduction
Presentlyī” ī”studentsī” ī”inī” ī”hostelsī” ī”ofī” ī”NITKī” ī”haveī” ī”toī” ī”callī” ī”theī” ī”variousī” ī”nightī” ī”canteensī” ī”that
areī” ī”presentī” ī”andī” ī”placeī” ī”theirī” ī”order.ī” ī”Butī” ī”thisī” ī”methodī” ī”posesī” ī”aī” ī”lotī” ī”ofī” ī”problems,ī” ī”someī” ī”of
whichī” ī”are:
āTheī” ī”studentsī” ī”haveī” ī”toī” ī”callī” ī”theī” ī”nightī” ī”canteenī” ī”whichī” ī”costsī” ī”money.
āLackī” ī”ofī” ī”properī” ī”menuī” ī”forī” ī”theī” ī”studentsī” ī”toī” ī”orderī” ī”from. 
āStudentsī” ī”areī” ī”keptī” ī”inī” ī”theī” ī”darkī” ī”aboutī” ī”theī” ī”statusī” ī”ofī” ī”theī” ī”order.
āProblemsī” ī”dueī” ī”toī” ī”lotsī” ī”ofī” ī”studentsī” ī”callingī” ī”theī” ī”nightī” ī”canteenī” ī”atī” ī”theī” ī”same
time.
āLossī” ī”ofī” ī”ordersī” ī”dueī” ī”toī” ī”poorī” ī”managementī” ī”inī” ī”theī” ī”nightī” ī”canteen.
āIfī” ī”theī” ī”studentī” ī”goesī” ī”toī” ī”theī” ī”Nightī” ī”Canteenī” ī”toī” ī”eatī” ī”heī” ī”willī” ī”haveī” ī”toī” ī”waitī” ī”for
quiteī” ī”aī” ī”bitī” ī”ofī” ī”timeī” ī”forī” ī”theī” ī”foodī” ī”toī” ī”beī” ī”prepared.

Weī” ī”hopeī” ī”toī” ī”removeī” ī”allī” ī”theseī” ī”problemsī” ī”byī” ī”creatingī” ī”aī” ī”onlineī” ī”platformī” ī”whereī” ī”the
studentsī” ī”canī” ī”placeī” ī”theirī” ī”orders.ī” ī”Thisī” ī”documentī” ī”definesī” ī”allī” ī”theī” ī”requirementsī” ī”ofī” ī”the
NCī” ī”managementī” ī”system.

Theī” ī”ideaī” ī”ofī” ī”theī” ī”projectī” ī”isī” ī”toī” ī”buildī” ī”aī” ī”webī” ī”applicationī” ī”thatī” ī”wouldī” ī”makeī” ī”theī” ī”processī” ī”of
orderingī” ī”foodī” ī”fromī” ī”nightī” ī”canteenī” ī”seamless.ī” ī”Thisī” ī”applicationī” ī”wouldī” ī”haveī” ī”everything
fromī” ī”theī” ī”ratingsī” ī”andī” ī”reviewsī” ī”ofī” ī”foodī” ī”itemsī” ī”availableī” ī”toī” ī”theī” ī”statusī” ī”ofī” ī”yourī” ī”orders.
Theī” ī”studentsī” ī”willī” ī”haveī” ī”toī” ī”loginī” ī”usingī” ī”theirī” ī”credentialsī” ī”andī” ī”thenī” ī”theyī” ī”haveī” ī”toī” ī”choose
theī” ī”foodī” ī”itemsī” ī”theyī” ī”wantī” ī”toī” ī”orderī” ī”fromī” ī”theī” ī”displayedī” ī”menuī” ī”andī” ī”theī” ī”orderī” ī”willī” ī”be
created.ī” ī”Theī” ī”userī” ī”willī” ī”thenī” ī”haveī” ī”aī” ī”choiceī” ī”whetherī” ī”toī” ī”haveī” ī”theī” ī”foodī” ī”deliveredī” ī”to
theirī” ī”hostelī” ī”blocksī” ī”orī” ī”goī” ī”toī” ī”Nightī” ī”Canteenī” ī”andī” ī”eat.







pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d

Partial preview of the text

Download Night Canteen Management System: A Web Application Design and Database Implementation and more Lab Reports Database Management Systems (DBMS) in PDF only on Docsity!

Database Management Systems Lab (CO303)

Report: Night Canteen Order Management System

Derik Clive R - 15CO

Arvind Sai K - 15CO

Introduction

Presently students in hostels of NITK have to call the various night canteens that are present and place their order. But this method poses a lot of problems, some of which are: ā The students have to call the night canteen which costs money. ā Lack of proper menu for the students to order from. ā Students are kept in the dark about the status of the order. ā Problems due to lots of students calling the night canteen at the same time. ā Loss of orders due to poor management in the night canteen. ā If the student goes to the Night Canteen to eat he will have to wait for quite a bit of time for the food to be prepared. We hope to remove all these problems by creating a online platform where the students can place their orders. This document defines all the requirements of the NC management system. The idea of the project is to build a web application that would make the process of ordering food from night canteen seamless. This application would have everything from the ratings and reviews of food items available to the status of your orders. The students will have to login using their credentials and then they have to choose the food items they want to order from the displayed menu and the order will be created. The user will then have a choice whether to have the food delivered to their hostel blocks or go to Night Canteen and eat.

Features

Student Features

ā This project is for all the Night Canteens in the campus. ā The online platform will provide the list of different Night Canteens along with the along with the various available food items. ā The customer has to login to open the web app. If the customer does not have an account he/she can register by inputting the required details. ā A customer can select any item from any canteen and add them to his/her cart and then place the order. ā The customer can view his/her past orders in the order history tab. ā The customer will also be able to see the status of his/her orders. ā The customer has an option to rate the food items. ā The customer will have a choice of either having the order delivered to their respective hostel blocks or go to the Night Canteen and have their food.

Canteen Manager Features

ā The Canteen Manager can login to the Night Canteen he/she manages. ā He/She can view the list of food items along with its details provided by the Night Canteen. ā He/She will be able to add/delete new food items. ā He/She will also have an option to modify the details of the existing food items. ā The Manager will also be able to view all the orders that are placed by the customers. ā The Manager can either accept/reject the orders placed and assign delivery boys to each of the orders. ā The manager can also add/delete delivery boys’ information of the Night Canteen.

ā— The user should also be able to rate and write reviews for the items he/she has ordered. ā— Once the order has been placed the user has to notified about the status of the food(ready or not). ā— If the user has chosen the option of the food being delivered to the hostel the user should be notified of the name of the delivery person. ā— If the user had chosen the option of having the food at the night canteen itself, he should be notified at least 10 minutes before the food is ready. ā The user should also be able to able to view his/her order history.

NIght Canteen Manager’s Requirements

ā Each manager would require his own credentials in order to login and place an order. ā The managers of the night canteen have to contact the admin of the application to be given an id for future use in the system. ā The Canteen Managers should be able to add food items (Name, Price, Category, Image) ā They should also be able to edit the existing food items and also delete the food items. ā The Manager should be able to view the placed orders of all the customers along with all the details (Order ID, Name, Food Items orders and its quantity, total bill amount, address of the customer). ā The Canteen Manager should be able accept/reject the orders placed by the customers. ā The Manager should also be able to add new delivery boy information or delete the existing delivery boys.

ā Managers should also be able to assign delivery boys to deliver the prepared orders. ā The Canteen Manager should also be able to update the status of the orders (Waiting Confirmation to being prepared, and being prepared to prepared ).

Database Requirements

The online platform uses a database to store the details of the users, the menu of the Night Canteens, the details of the orders placed, details of the canteen manager and many more details. The database consists of several tables. The list of tables are:

  1. Student Table having the following attributes: a. SID: The ID assigned to the customer to uniquely identify the customer in the database. b. Name: A composite attribute which consists of the first_name, middle_name and last_name. c. Address: A composite attribute which consists of Block number, Floor, Room Number. d. Phone Number: It stored the phone number of the user which is also unique to all of the students. e. Email Id: The email account the student will be using to login to the online platform. f. Password: The password entered by the student which will be stored in hashed format in the database for the protection of the student’s account.

g. Reviews: A composite attribute consisting of the User_ID, the comment and the rating given by the user. h. Preparation Time: The time that is required to prepare the food item in minutes. i. Image of the food item: It stored the path of the image of the food item on the server side.

  1. Order table having the following attributes: a. Bill ID/Order ID: A primary key used to uniquely identify all the orders in the database. b. User_ID: The ID of the user who placed the order. c. Date: The date when the order was placed. d. Items: A composite multivalued attribute which stores the list of all the food items along with their quantities and price. e. Total Amount: The bill amount which is calculated by summing up all the prices of the individual items in the order. f. Status: A enum type to indicate whether the order is being prepared, awaiting confirmation or has been prepared.
  2. Canteen Manager Table having the following attributes: a. Name b. NC_ID: The ID of the Night Canteen he/she manages. This is foreign key to the NC ID of the Night Canteen table so as to identify the NC the Manager manages. c. Login Credentials: A composite attribute which stores the user_name and password used by the managers to login.This include the username and the password which will be provided by the administrator of the system.
  1. Delivery Boy Table having the following attributes: a. NC_ID: The ID of the Night Canteen he/she works for. b. Vehicle Registration Number: The registration number of the vehicle he/she uses.
  2. User Cart Table is a temporary table which stored the details of the order to be placed by the customer having the following attributes (This table will be created when the user logs in and will be reset when the user places the order and deleted when the user logs out.): a. SID: The ID of the student who is placing the order, which is an foreign key which references the Student ID of the Student table which will be used to find out the destination address. b. FoodID: The ID of the food ID that the customer wishes to buy. It is an foreign key to the Food item ID in the Food Item Table. c. Price: The rate of the item to be ordered. d. Quantity: The number of food items of each type the user wishes to order.

Website Requirements

Student Side:

  1. Login Screen: The web app should display a form where the users can enter the credentials and pass the input to the backend.
  2. Registration Screen: The web app should also provide a form where the users can input their information to create a new account.
  3. Night Canteen Details Screen: After successful login, the user should be redirected to a screen displaying the list of different Night Canteens.

ā— Manage the delivery staff: This tab should allow the manager to add/remove delivery boys.

Design

ER Diagram:

The Entity-Relationship Diagram of the NIght Canteen Management System is given below:

Legend ā— : Participation of 1 (numbers used in ratios 1:1, 1:N , N:1 etc) ā— : Participation of N ā— : Total Participation ā— : Partial Participation

Relation Schema:

Normalisation Steps:

1. The first Normal Form obtained by applying the steps to convert the ER Diagram to Relational Schema:

Night Canteen

NcID Name Location Start_time End_time CmID(FK)

Phone Number

NcID(FK) Phone_number Canteen Manager CmID Name Username Password

Food Item

FoodID Name Price Availability ImageURL Ratings Num_ratings PreparationTime CmID(FK)

Orders

OrderID ODate Total UserID Status CmID(FK)

Canteen Manager CmID Name Username Password

Food Item

FoodID Name Price Availability ImageURL Ratings Num_ratings PreparationTime CmID(FK)

Orders

OrderID ODate Total UserID Status CmID(FK)

Items

OrderID(FK) FoodID Quantity

Student

SID FirstName LastName PhoneNumber EmailID Password RoomNo Floor BlockName

Student-Order

SID(FK) OrderID(FK)

Delivery Boy

RegNo Name

Delivery Boy-Order details

CmID(FK) RegNo(FK) SID(FK)

User Cart

SID(FK) FoodID(FK) Price Quantity

The schema of the Night Canteen Management System is given below:

We had to learn a lot of new softwares to complete the project which include the Flask package of python which was used in the backed for routing the web pages, HTML and CSS for designing the forms and the webpages.

Screenshots

  1. Homepage

This is the homepage of the web application. The users have to click on ā€œStudentā€ or ā€œCanteen Managerā€ depending upon who they are.

  1. Login for Canteen Manager

For the four night canteens that are present logins have been created for them and will be given to the respective canteen managers who can use it to login here. The credentials given here are for 3rd Block night canteen.

4 ) Admin dashboard : Add item

The admin can add items as shown below.

  1. Admin View orders

  2. Admin View order details