NATIONAL UNIVERSITY OF COMPUTER & EMERGING SCIENCES (FAST-NU) Course: Database Systems Project Report RESTAURANT RESERVATION SYSTEM Course Instructor : Miss Anum Qureshi Prepared by: Zeeshan Awan (20K-1741) BSE-6A TABLE OF CONTENTS 1. ABSTRACT: 2. PROBLEM STATEMENT/MOTIVATION: 3. TECHNOLOGY USED 3.1 FRONT END: 3.2 BACK END: 4. MAIN FEATURES 1. Customers 2. Admin 5. SYSTEM DESINGS 6. NORMALIZATION 7. IMPLEMENTATION PHASE 8. OVERVIEW OF SOFTWARE 3 3 3 3 4 4 5 5 5 7 9 17 1. ABSTRACT: The system provides convenience to the customer and the staff. It provides a better communication platform. This System sets up a menu online and customers can easily access the website from any browser with a simple mouse click. By using the system, it would be feasible to store data of chefs, menu items, customer queries, reservations available and different shops. The website also allows the customers to easily reserve/book a table without needing to visit the restaurant or even make a phone call. The user’s information which the website requires for reservations and contact facilitates is also kept private. Customers can view our menu, items and prices on the website itself before giving us a visit. To build a trustworthy relationship with the customers, we also provide the details of our chefs directly in the website. 2. PROBLEM STATEMENT/MOTIVATION: A restaurant SteakIn wants to have an online website where they can provide a platform for the customers to contact the restaurant or send a message if they have any query, etc. SteakIn currently have a manual system in which the customers have to make a phone call and then wait for the administration to entertain the call. This is time consuming for the customers so Steakin wants a website where the customers can directly reserve a seat. Furthermore, there management saves everything on papers which is time consuming and less secure so they also want a management system where they can also store their data directly from the interface and also view the data from their directly. It will save the time of administrator tremendously. 3. TECHNOLOGY USED The various technologies have been used in developing the front-end and back-end of the software. Those are mentioned below: 3.1 FRONT END: HTML, CSS are utilized to implement the frontend. The editor we used to implement the code is Visual Studio Code. HTML (Hyper Text Mark-up Language): HTML was a syntax used to format the text documents on the web. CSS (Cascading Style Sheets): CSS is a style sheet language that we used for describing the look and formatting the documents written in mark-up language. BOOTSRATP: Bootstrap is a free and open-source CSS framework directed at responsive, mobile-first front-end web development. It contains HTML, CSS and JavaScript-based design templates for typography, forms, buttons, navigation, and other interface components. EJS: EJS is a simple templating language that lets you generate HTML markup with plain JavaScript. 3.2 BACK END: Back end is implemented using the server side script in Javascript. MySQL is used to design the databases. The database is present on MySQL Workbench. MySQL: MySQL is an open source relational database management system (RDMS). The SQL phrase stands for structured query. It runs as a server and allows multiple users to manage and create numerous databases and is capable of handling a large concurrent database connection . NODEJS: Node.js is an open-source server environment. Node.js is cross-platform and runs on Windows, Linux, Unix, and macOS. Node.js is a back-end JavaScript runtime environment . EXPRESSJS: Express.js, or simply Express, is a back end web application framework for building RESTful APIs with Node.js 4. MAIN FEATURES We have design the features according to our need of stakeholders. 1. Customers ● They can check out our five different types of menus and today's menu (special items of the day). ● They can check out all the chefs working in different branches of the restaurant. ● They can leave a query by filling out a contact us form. ● They can book a table according to their availability (date, time and capacity), by filling out a reservation form. 2. Admin He can authorize to manage the whole admin portal. ● ● ● ● ● 5. He can add/update/delete chefs. He can add/update/delete reservations so that customers can book easily. He can add/update/delete all five different types of menus along with today’s menu. He can enter a specific date to see all the queries made by customers. He can enter a specific date to check all the reservations on a particular date. SYSTEM DESINGS The system designs are as follows: 5.1 CONCEPTUAL SCHEMA (ERD) The ERD of our project is as follows: 5.2 ARCHITECTURAL DESIGN This website is built on a 3-tier architecture. ● The user interface. ● The application tier. ● The data tier. Using 3-tier architecture, we have the advantage to developing and managing them separately and the benefit of updating and scaling them without impacting the other tiers. At first, the user enters the query or performs the action in the user interface. It is received by the application tier which processes the query and communicates with the database in the data tier. It then processes that data and displays it to the user in the user interface. 6. NORMALIZATION idChefs in this table refers to the chefs that prepared these items (Breakfast, Lunch, Dinner, Dessert and Drink). It contains more than one value which violates 1nf. It is resolved in 2nf. Second Normal Form: 1) 2) 3) 4) 5) 6) FD-2 violates 2nf as it is not fully functionally dependant on primary key. FD-7 violates 2nf as it is not fully functionally dependant on primary key. FD-8 violates 2nf as it is not fully functionally dependant on primary key. FD-9 violates 2nf as it is not fully functionally dependant on primary key. FD-10 violates 2nf as it is not fully functionally dependant on primary key. FD-11 violates 2nf as it is not fully functionally dependant on primary key. PK/FK idBookingAvailable PK idBookingMade PK idBookingAvailable PK idChefs NoOfPeople FName CName BDate LName BTime ToC PK/FK PK/FK PK/FK idBreakfast idLunch idDinner idDeserts PK idBreakfast breakfastItemName CPhone idShops idShops ShopName ShopName BreakfastAmount BreakFastDetals LunchItemName LunchAmount LunchDetails idChefs FK idDinner PK DinnerItemName DinnerAmount DinnerDetails idChefs FK DrinkItemName ShopAddress PK/FK PK/FK idDrink idLunch PK PK idDrink ShopAddress DrinkAmount DrinkDetails FK idChefs FK idChefs ShopPhoneNo ShopPhone PK idDeserts DesertItemName DesertAmount DesertDetails FK idChefs Third Normal Form: 1) FD-3 violates 3nf as fully functionally dependant on a non-primary key ‘idShops. 2) FD-5 violates 3nf as fully functionally dependant on a non-primary key ‘idShops. BookingsMade idBookingAvailable PK/FK idBookingMade PK CName CPhone BookingAvailable idBookingAvailable PK NoOfPeople BDate BTime idShops FK Shops idShops PK ShopName ShopAddress ShopPhoneNo Chefs idChefs FName LName ToC idShops FK PK TodaysMenu idBreakfast idLunch PK/FK PK/FK idDinner idDeserts PK/FK idDrink PK/FK PK/FK Breakfast idBreakfast breakfastItemName BreakfastAmount BreakFastDetals PK FK Lunch idLunch LunchItemName LunchAmount LunchDetails PK idChefs FK Dinner idDinner PK Drinks idChefs DinnerItemName DinnerAmount DinnerDetails idChefs FK idDrink DrinkItemName DrinkAmount DrinkDetails PK idChefs FK Deserts idDeserts DesertItemName DesertAmount DesertDetails idChefs PK FK ContactUs idContactus 7. FName PK LName Email IMPLEMENTATION PHASE ● JOINS Phone Message Joins have been used to retrieve the data from five different menu tables as it has all the menu ids as Foreign key. Joins also have been used to retrieve the data from both the chef and shop tables to display details to the customer. ● PROCEDURES We have used the above procedures instead of normal query as they are already compiled so run faster than queries. ● TRIGGERS Triggers are used at: 1. Whenever a chef data is deleted, it is inserted to oldchef table. 2. Whenever a reservations have been, it is inserted into reservationsmade table. 3. Whenever any of the menu (lunch/breakfast/dinner/dessert/drinks) is updated or deleted, it is inserted into oldmenu table. ● VIEWS Views have been created from the table of contactus and reservationsmade, that helps the admin in viewing the reservations made on a particular date and the queries made by the customer on a particular date. Also used views for counting reservations made and queries generated that have been grouped by date. ● TRANSACTION HANDLING After a booking has been made, our program commits that change to our database. If any error occurs, it will rollback to the previous save point. ● FUNCTIONS Function have been used to authorize the login form for admins. 8. OVERVIEW OF SOFTWARE ● LANDING PAGE ● CONTACT US FORM ● CHEFS PAGE ● MENU PAGE ● RESERVATION ● ADMIN PORTAL