0% found this document useful (0 votes)
515 views

Restaurant Management System Database Schema: Inventory

The document provides the database schema for a restaurant management system. It includes tables for inventory, menu, orders, employees, tables, user assignments to tables and tablets, and notifications. The schema outlines 14 tables to store information on inventory, menu, orders, employees, tables, user assignments, notifications, categories, companies, user groups, and users. It also lists the actors that require login as administrators, hall managers, and kitchen managers.

Uploaded by

hamad cabdalla
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
515 views

Restaurant Management System Database Schema: Inventory

The document provides the database schema for a restaurant management system. It includes tables for inventory, menu, orders, employees, tables, user assignments to tables and tablets, and notifications. The schema outlines 14 tables to store information on inventory, menu, orders, employees, tables, user assignments, notifications, categories, companies, user groups, and users. It also lists the actors that require login as administrators, hall managers, and kitchen managers.

Uploaded by

hamad cabdalla
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Restaurant Management System

Database Schema

Inventory
Item Name, Price, Quantity, Min Threshold

Menu
Dish Name, Estimated time, Type of Dish, Price

MenuItems
Dish Name, (Inventory) Item Name, Quantity (Used)

Order
OrderID, TableID, Timestamp, Status

OrderDetails
OrderID, DishID/Dish name, Estimated Time, Priority(1/0), Status, Quantity(Servings per Dish)

Employee
Employee ID, Name, Specialty (For Chef Only), Type (Waiter/Chef/Manager), Availability status,
Salary

Table
Table ID, Status, Capacity
Tablet
Tablet ID, Status

Assignment
Employee ID (Employee), Table ID (Table), Tablet ID (Tablet)

Notification
Item Name, Time, read (true/false)

-------------------------------------------------------------------------------------------------------------------------------

Actors that require Login:


1. Admin
2. Hall Manager
3. Kitchen Manager
--
ph
pM
yA
dm
in
SQ
L
Du
mp
-- version 4.7.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Mar 01, 2018 at 03:05 PM
-- Server version: 5.6.35
-- PHP Version: 7.0.22

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


SET time_zone = "+00:00";

--
-- Database: `restaurant`
--

-- --------------------------------------------------------

--
-- Table structure for table `category`
--

CREATE TABLE `category` (


`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`active` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `company`
--

CREATE TABLE `company` (


`id` int(11) NOT NULL,
`company_name` varchar(255) NOT NULL,
`service_charge_value` varchar(255) NOT NULL,
`vat_charge_value` varchar(255) NOT NULL,
`address` varchar(255) NOT NULL,
`phone` varchar(255) NOT NULL,
`country` varchar(255) NOT NULL,
`message` text NOT NULL,
`currency` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `company`
--

INSERT INTO `company` (`id`, `company_name`, `service_charge_value`, `vat_charge_value`,


`address`, `phone`, `country`, `message`, `currency`) VALUES
(1, 'Lulu', '', '13', 'READING', '234234235', 'Spai', 'this is just an testing', 'USD');

-- --------------------------------------------------------

--
-- Table structure for table `groups`
--

CREATE TABLE `groups` (


`id` int(11) NOT NULL,
`group_name` varchar(255) NOT NULL,
`permission` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `groups`
--

INSERT INTO `groups` (`id`, `group_name`, `permission`) VALUES


(1, 'Super Administrator', 'a:32:
{i:0;s:10:\"createUser\";i:1;s:10:\"updateUser\";i:2;s:8:\"viewUser\";i:3;s:10:\"deleteU
ser\";i:4;s:11:\"createGroup\";i:5;s:11:\"updateGroup\";i:6;s:9:\"viewGroup\";i:7;s:11:\
"deleteGroup\";i:8;s:11:\"createStore\";i:9;s:11:\"updateStore\";i:10;s:9:\"viewStore\";
i:11;s:11:\"deleteStore\";i:12;s:11:\"createTable\";i:13;s:11:\"updateTable\";i:14;s:9:\
"viewTable\";i:15;s:11:\"deleteTable\";i:16;s:14:\"createCategory\";i:17;s:14:\"updateCa
tegory\";i:18;s:12:\"viewCategory\";i:19;s:14:\"deleteCategory\";i:20;s:13:\"createProdu
ct\";i:21;s:13:\"updateProduct\";i:22;s:11:\"viewProduct\";i:23;s:13:\"deleteProduct\";i
:24;s:11:\"createOrder\";i:25;s:11:\"updateOrder\";i:26;s:9:\"viewOrder\";i:27;s:11:\"de
leteOrder\";i:28;s:10:\"viewReport\";i:29;s:13:\"updateCompany\";i:30;s:11:\"viewProfile
\";i:31;s:13:\"updateSetting\";}'),
(4, 'Members', 'a:9:
{i:0;s:9:\"viewStore\";i:1;s:11:\"deleteStore\";i:2;s:9:\"viewTable\";i:3;s:11:\"deleteT
able\";i:4;s:12:\"viewCategory\";i:5;s:11:\"viewProduct\";i:6;s:11:\"createOrder\";i:7;s
:11:\"updateOrder\";i:8;s:9:\"viewOrder\";}'),
(5, 'Staff', 'a:6:
{i:0;s:9:\"viewTable\";i:1;s:11:\"viewProduct\";i:2;s:11:\"createOrder\";i:3;s:11:\"upda
teOrder\";i:4;s:9:\"viewOrder\";i:5;s:11:\"viewProfile\";}');

-- --------------------------------------------------------

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (


`id` int(11) NOT NULL,
`bill_no` varchar(255) NOT NULL,
`date_time` varchar(255) NOT NULL,
`gross_amount` varchar(255) NOT NULL,
`service_charge_rate` varchar(255) NOT NULL,
`service_charge_amount` varchar(255) NOT NULL,
`vat_charge_rate` varchar(255) NOT NULL,
`vat_charge_amount` varchar(255) NOT NULL,
`discount` varchar(255) NOT NULL,
`net_amount` varchar(255) NOT NULL,
`user_id` int(11) NOT NULL,
`table_id` int(11) NOT NULL,
`paid_status` int(11) NOT NULL,
`store_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `order_items`
--

CREATE TABLE `order_items` (


`id` int(11) NOT NULL,
`order_id` int(11) NOT NULL,
`product_id` int(11) NOT NULL,
`qty` varchar(255) NOT NULL,
`rate` varchar(255) NOT NULL,
`amount` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `products`
--

CREATE TABLE `products` (


`id` int(11) NOT NULL,
`category_id` text NOT NULL,
`store_id` text NOT NULL,
`name` varchar(255) NOT NULL,
`price` varchar(255) NOT NULL,
`description` text NOT NULL,
`image` text NOT NULL,
`active` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `stores`
--

CREATE TABLE `stores` (


`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`active` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `tables`
--

CREATE TABLE `tables` (


`id` int(11) NOT NULL,
`table_name` varchar(255) NOT NULL,
`capacity` varchar(255) NOT NULL,
`available` int(11) NOT NULL,
`active` int(11) NOT NULL,
`store_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (


`id` int(11) NOT NULL,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`firstname` varchar(255) NOT NULL,
`lastname` varchar(255) NOT NULL,
`phone` varchar(255) NOT NULL,
`gender` int(11) NOT NULL,
`store_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `username`, `password`, `email`, `firstname`, `lastname`,


`phone`, `gender`, `store_id`) VALUES
(1, 'admin', '$2y$10$yfi5nUQGXUZtMdl27dWAyOd/jMOmATBpiUvJDmUu9hJ5Ro6BE5wsK',
'[email protected]', 'john', 'doe', '80789998', 1, 0);

-- --------------------------------------------------------

--
-- Table structure for table `user_group`
--

CREATE TABLE `user_group` (


`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`group_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `user_group`
--

INSERT INTO `user_group` (`id`, `user_id`, `group_id`) VALUES


(1, 1, 1);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `category`
--
ALTER TABLE `category`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `company`
--
ALTER TABLE `company`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `groups`
--
ALTER TABLE `groups`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `order_items`
--
ALTER TABLE `order_items`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `products`
--
ALTER TABLE `products`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `stores`
--
ALTER TABLE `stores`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tables`
--
ALTER TABLE `tables`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `user_group`
--
ALTER TABLE `user_group`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `category`
--
ALTER TABLE `category`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `company`
--
ALTER TABLE `company`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `groups`
--
ALTER TABLE `groups`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `order_items`
--
ALTER TABLE `order_items`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `stores`
--
ALTER TABLE `stores`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `tables`
--
ALTER TABLE `tables`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `user_group`
--
ALTER TABLE `user_group`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
phpMyAdmi
n SQL
Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 11, 2014 at 10:25 PM
-- Server version: 5.6.14
-- PHP Version: 5.5.6

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;


/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `oose`
--

-- --------------------------------------------------------
--
-- Table structure for table `category`
--

CREATE TABLE IF NOT EXISTS `category` (


`catId` int(11) NOT NULL AUTO_INCREMENT,
`catDesc` varchar(20) NOT NULL,
PRIMARY KEY (`catId`),
UNIQUE KEY `catId` (`catId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `category`
--

INSERT INTO `category` (`catId`, `catDesc`) VALUES


(1, 'Soup'),
(2, 'Appetizer'),
(3, 'Main Course'),
(4, 'Dessert');

-- --------------------------------------------------------

--
-- Table structure for table `employee`
--

CREATE TABLE IF NOT EXISTS `employee` (


`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(20) NOT NULL,
`pwd` varchar(32) NOT NULL,
`role` varchar(10) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
--
-- Dumping data for table `employee`
--

INSERT INTO `employee` (`id`, `username`, `pwd`, `role`) VALUES


(1, 'waiter', '202cb962ac59075b964b07152d234b70', 'waiter'),
(2, 'cook', '202cb962ac59075b964b07152d234b70', 'cook'),
(3, 'busboy', '202cb962ac59075b964b07152d234b70', 'busboy'),
(4, 'host', '202cb962ac59075b964b07152d234b70', 'host');

-- --------------------------------------------------------

--
-- Table structure for table `floorplan`
--

CREATE TABLE IF NOT EXISTS `floorplan` (


`tableid` int(11) NOT NULL AUTO_INCREMENT,
`status` varchar(10) NOT NULL,
`waiterid` int(11) NOT NULL,
PRIMARY KEY (`tableid`),
UNIQUE KEY `tableid` (`tableid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;

--
-- Dumping data for table `floorplan`
--

INSERT INTO `floorplan` (`tableid`, `status`, `waiterid`) VALUES


(1, 'open', 1),
(2, 'occupied', 1),
(3, 'open', 1),
(4, 'dirty', 1),
(5, 'occupied', 1),
(6, 'occupied', 1);
-- --------------------------------------------------------

--
-- Table structure for table `item`
--

CREATE TABLE IF NOT EXISTS `item` (


`itemid` int(11) NOT NULL AUTO_INCREMENT,
`catid` int(11) NOT NULL,
`desc` varchar(30) NOT NULL,
`price` float(10,2) NOT NULL,
PRIMARY KEY (`itemid`),
UNIQUE KEY `itemid` (`itemid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ;

--
-- Dumping data for table `item`
--

INSERT INTO `item` (`itemid`, `catid`, `desc`, `price`) VALUES


(1, 1, 'Miso soup', 3.50),
(2, 1, 'Chicken soup', 4.99),
(3, 1, 'Goulash soup', 4.00),
(4, 1, 'Lentil soup', 3.49),
(5, 2, 'Artichoke Spinach Dip', 4.00),
(6, 2, 'Chicken Spread', 4.99),
(7, 2, 'Guacamole', 5.50),
(8, 2, 'Pepperoni Bread', 6.25),
(9, 3, 'Baked Teriyaki Chick', 7.49),
(10, 3, 'Chicken Marsala', 8.21),
(11, 3, 'Grilled Salmon', 9.99),
(12, 3, 'Salsa Chicken', 10.99),
(13, 4, 'Apple crisp', 4.25),
(14, 4, 'Bread pudding', 4.49),
(15, 4, 'Fudge', 4.99),
(16, 4, 'Parfait', 3.99);
-- --------------------------------------------------------

--
-- Table structure for table `orders`
--

CREATE TABLE IF NOT EXISTS `orders` (


`orderid` int(11) NOT NULL AUTO_INCREMENT,
`orderref` varchar(20) NOT NULL,
`tableid` int(11) NOT NULL,
`orderlist` text NOT NULL,
`done` tinyint(1) NOT NULL DEFAULT '0',
`paid` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`orderid`),
UNIQUE KEY `orderid` (`orderid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ;

--
-- Dumping data for table `orders`
--

INSERT INTO `orders` (`orderid`, `orderref`, `tableid`, `orderlist`, `done`,


`paid`) VALUES
(1, '4order20141211152000', 4, 'Chicken Marsala-1-8.21;Artichoke Spinach Dip-1-
4.00;Fudge-2-4.99;Baked Teriyaki Chick-1-7.49;Pepperoni Bread-1-6.25;Apple crisp-
1-4.25;Salsa Chicken-2-10.99;Baked Teriyaki Chick-1-7.49;Chicken Spread-1-
4.99;Pepperoni Bread-1-6.25;Chicken Marsala-1-8.21;Goulash soup-1-4.00;Goulash
soup-1-4.00;Chicken Spread-1-4.99;', 1, 1),
(3, '3order20141211152339', 3, 'Fudge-2-4.99;', 1, 1),
(4, '2order20141211164145', 2, 'Chicken soup-1-4.99;Grilled Salmon-1-
9.99;Parfait-1-3.99;', 1, 1),
(5, '2order20141211193729', 2, 'Miso soup-4-3.50;Goulash soup-4-4.00;', 1, 1),
(6, '4order20141211220226', 4, 'Goulash soup-1-4.00;Salsa Chicken-3-10.99;', 1,
1),
(7, '3order20141211220301', 3, 'Artichoke Spinach Dip-1-4.00;Fudge-1-4.99;', 1,
1),
(8, '5order20141211221114', 5, '', 1, 1),
(9, '5order20141211221642', 5, '', 1, 1),
(10, '5order20141211222357', 5, 'Goulash soup-1-4.00;Grilled Salmon-1-9.99;', 1,
1),
(11, '6order20141211222432', 6, 'Grilled Salmon-2-9.99;Guacamole-5-5.50;', 1, 1);

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;


/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

You might also like