-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8051 -- Generation Time: Mar 20, 2019 at 08:36 PM -- Server version: 5.7.23 -- PHP Version: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `restaurant` -- -- -------------------------------------------------------- -- -- Table structure for table `chef` -- CREATE TABLE `chef` ( `ID` int(1) NOT NULL, `Name` varchar(5) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `chef` -- INSERT INTO `chef` (`ID`, `Name`) VALUES (1, 'Roger'), (2, 'Sally'); -- -------------------------------------------------------- -- -- Table structure for table `customer` -- CREATE TABLE `customer` ( `ID` int(1) NOT NULL, `Name` varchar(11) DEFAULT NULL, `Age` int(2) DEFAULT NULL, `Gender` varchar(6) DEFAULT NULL, `Income` int(2) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `customer` -- INSERT INTO `customer` (`ID`, `Name`, `Age`, `Gender`, `Income`) VALUES (1, 'Stan Jones', 34, 'Male', 44), (2, 'Betty Jones', 34, 'Female', 44), (3, 'Jim Kim', 48, 'Male', 52), (4, 'Jane Perez', 24, 'Female', 52), (5, 'Tim Smith', 60, 'Male', 35), (6, 'Sue Keller', 18, 'Female', 6); -- -------------------------------------------------------- -- -- Table structure for table `inventory` -- CREATE TABLE `inventory` ( `ID` int(2) NOT NULL, `Name` varchar(20) DEFAULT NULL, `Amt` text, `Deliver_date` date DEFAULT NULL, `Expiry_date` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `inventory` -- INSERT INTO `inventory` (`ID`, `Name`, `Amt`, `Deliver_date`, `Expiry_date`) VALUES (1, 'spaghetti', '120', '2019-03-01', '2019-07-01'), (2, 'ziti', '140', '2019-03-01', '2019-07-01'), (3, 'meatballs', '30', '2019-03-01', '2019-03-05'), (4, 'peas', '40', '2019-03-01', '2019-03-07'), (5, 'broccoli', '160', '2019-03-01', '2019-03-07'), (6, 'redsauce', '22', '2019-03-01', '2019-03-12'), (7, 'whitesauce', '88', '2019-03-01', '2019-03-07'); -- -------------------------------------------------------- -- -- Table structure for table `meal` -- CREATE TABLE `meal` ( `ID` int(2) NOT NULL, `Customer_ID` int(1) DEFAULT NULL, `Menu_ID` int(1) DEFAULT NULL, `Chef_ID` int(1) DEFAULT NULL, `Time` int(2) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `meal` -- INSERT INTO `meal` (`ID`, `Customer_ID`, `Menu_ID`, `Chef_ID`, `Time`) VALUES (1, 1, 1, 1, 12), (2, 2, 1, 1, 13), (3, 3, 4, 1, 14), (4, 4, 2, 1, 11), (5, 5, 7, 1, 12), (6, 6, 4, 1, 17), (7, 5, 2, 1, 12), (8, 4, 3, 1, 12), (9, 4, 5, 1, 15), (10, 2, 7, 2, 14), (11, 5, 4, 2, 15), (12, 1, 6, 2, 10), (13, 1, 7, 2, 14), (14, 2, 1, 2, 15), (15, 4, 6, 2, 14), (16, 4, 6, 2, 12), (17, 6, 5, 2, 15), (18, 6, 8, 2, 11), (19, 5, 8, 1, 14), (20, 1, 5, 1, 11), (21, 5, 4, 1, 8), (22, 4, 4, 1, 10), (23, 1, 1, 1, 15), (24, 3, 7, 1, 10), (25, 4, 5, 1, 13), (26, 5, 5, 1, 14), (27, 3, 2, 1, 13), (28, 4, 8, 2, 11), (29, 1, 2, 2, 13), (30, 2, 1, 2, 12); -- -------------------------------------------------------- -- -- Table structure for table `menu` -- CREATE TABLE `menu` ( `ID` int(2) NOT NULL, `Name` varchar(32) DEFAULT NULL, `Temperature` int(2) DEFAULT NULL, `Prep_time` int(2) DEFAULT NULL, `Price` float DEFAULT NULL, `Genre` varchar(6) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `menu` -- INSERT INTO `menu` (`ID`, `Name`, `Temperature`, `Prep_time`, `Price`, `Genre`) VALUES (1, 'Spaghetti_with_red', 85, 15, 8, 'Entree'), (2, 'Spaghetti_with_meatballs', 90, 16, 12, 'Entree'), (3, 'Spaghetti_with_peas_and_broccoli', 85, 18, 11, 'Entree'), (4, 'Spaghetti_with_white', 80, 16, 9, 'Entree'), (5, 'Ziti_with_red', 85, 14, 8, 'Entree'), (6, 'Ziti_with_meatballs', 90, 15, 12, 'Entree'), (7, 'Ziti_with_peas_and_broccoli', 85, 17, 11, 'Entree'), (8, 'Ziti_with_white', 80, 14, 9, 'Entree'); -- -------------------------------------------------------- -- -- Table structure for table `prepares` -- CREATE TABLE `prepares` ( `ID` int(2) NOT NULL, `Inventory_ID` int(1) DEFAULT NULL, `Meal_ID` int(1) DEFAULT NULL, `Amt` decimal(4,3) DEFAULT NULL, `Cost` decimal(3,2) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `prepares` -- INSERT INTO `prepares` (`ID`, `Inventory_ID`, `Meal_ID`, `Amt`, `Cost`) VALUES (1, 1, 1, '0.625', '0.22'), (2, 6, 1, '0.450', '0.60'), (3, 2, 5, '0.625', '0.22'), (4, 6, 5, '0.450', '0.60'), (5, 1, 2, '0.625', '0.22'), (6, 3, 2, '0.300', '0.89'), (7, 6, 2, '0.375', '0.50'), (8, 1, 6, '0.625', '0.22'), (9, 3, 6, '0.300', '0.89'), (10, 6, 6, '0.375', '0.50'), (11, 1, 3, '0.518', '0.20'), (12, 4, 3, '0.250', '0.12'), (13, 5, 3, '0.500', '0.19'), (14, 7, 3, '0.450', '0.75'), (15, 1, 7, '0.518', '0.20'), (16, 4, 7, '0.250', '0.12'), (17, 5, 7, '0.500', '0.19'), (18, 7, 7, '0.450', '0.75'), (19, 1, 4, '0.625', '0.22'), (20, 7, 4, '0.450', '0.75'), (21, 2, 8, '0.625', '0.22'), (22, 7, 8, '0.450', '0.75'); -- -------------------------------------------------------- -- -- Table structure for table `tables` -- CREATE TABLE `tables` ( `ID` int(1) NOT NULL, `seats` int(1) DEFAULT NULL, `location` varchar(8) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `tables` -- INSERT INTO `tables` (`ID`, `seats`, `location`) VALUES (1, 2, 'window'), (2, 3, 'interior'), (3, 4, 'window'), (4, 6, 'interior'); -- -------------------------------------------------------- -- -- Table structure for table `visit` -- CREATE TABLE `visit` ( `ID` int(2) NOT NULL, `Customer_ID` int(1) DEFAULT NULL, `Table_ID` int(1) DEFAULT NULL, `Arrival_Time` time(5) DEFAULT NULL, `Meal_Time` time(5) DEFAULT NULL, `Pay_Time` time(5) DEFAULT NULL, `Leave_Time` time(5) DEFAULT NULL, `Total_Paid` varchar(10) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `visit` -- INSERT INTO `visit` (`ID`, `Customer_ID`, `Table_ID`, `Arrival_Time`, `Meal_Time`, `Pay_Time`, `Leave_Time`, `Total_Paid`) VALUES (1, 1, 1, '18:00:00.00000', '18:15:00.00000', '18:24:00.00000', '18:25:00.00000', '8'), (2, 2, 1, '18:00:00.00000', '18:15:00.00000', '18:24:00.00000', '18:25:00.00000', '12'), (3, 3, 3, '18:05:00.00000', '18:18:00.00000', '18:26:00.00000', '18:39:00.00000', '11'), (4, 4, 3, '18:05:00.00000', '18:18:00.00000', '18:26:00.00000', '18:39:00.00000', '8'), (5, 5, 2, '18:27:00.00000', '18:37:00.00000', '18:43:00.00000', '19:01:00.00000', '8'), (6, 6, 2, '18:27:00.00000', '18:37:00.00000', '18:43:00.00000', '19:01:00.00000', '12'), (7, 5, 2, '18:31:00.00000', '18:37:00.00000', '18:43:00.00000', '19:01:00.00000', '8'), (8, 1, 1, '19:00:00.00000', '19:08:00.00000', '19:11:00.00000', '19:19:00.00000', '11'), (9, 3, 1, '19:00:00.00000', '19:10:00.00000', '19:17:00.00000', '19:17:00.00000', '8'), (10, 4, 3, '19:12:00.00000', '19:26:00.00000', '19:36:00.00000', '19:55:00.00000', '8'), (11, 4, 3, '19:12:00.00000', '19:26:00.00000', '19:36:00.00000', '19:55:00.00000', '9'), (12, 6, 3, '19:12:00.00000', '19:26:00.00000', '19:36:00.00000', '19:55:00.00000', '11'), (13, 4, 3, '19:12:00.00000', '19:30:00.00000', '19:35:00.00000', '19:44:00.00000', '12'), (14, 1, 2, '19:32:00.00000', '19:44:00.00000', '19:48:00.00000', '19:57:00.00000', '12'), (15, 2, 2, '19:38:00.00000', '19:44:00.00000', '19:48:00.00000', '19:57:00.00000', '11'), (16, 4, 1, '20:10:00.00000', '20:25:00.00000', '20:29:00.00000', '20:38:00.00000', '8'), (17, 5, 1, '20:10:00.00000', '20:25:00.00000', '20:29:00.00000', '20:38:00.00000', '12'), (18, 2, 2, '20:13:00.00000', '20:33:00.00000', '20:35:00.00000', '20:52:00.00000', '12'), (19, 5, 2, '20:13:00.00000', '20:33:00.00000', '20:35:00.00000', '20:52:00.00000', '9'), (20, 6, 3, '20:22:00.00000', '20:33:00.00000', '20:39:00.00000', '20:42:00.00000', '8'), (21, 6, 3, '20:22:00.00000', '20:39:00.00000', '20:39:00.00000', '20:42:00.00000', '9'), (22, 1, 4, '20:29:00.00000', '20:51:00.00000', '21:08:00.00000', '21:26:00.00000', '11'), (23, 2, 4, '20:29:00.00000', '20:51:00.00000', '21:08:00.00000', '21:26:00.00000', '12'), (24, 5, 4, '20:29:00.00000', '20:51:00.00000', '21:08:00.00000', '21:26:00.00000', '9'), (25, 5, 4, '20:29:00.00000', '20:50:00.00000', '21:08:00.00000', '21:26:00.00000', '9'), (26, 2, 4, '20:29:00.00000', '20:50:00.00000', '21:08:00.00000', '21:26:00.00000', '9'), (27, 4, 1, '21:00:00.00000', '21:08:00.00000', '21:17:00.00000', '21:26:00.00000', '8'), (28, 2, 1, '21:15:00.00000', '21:08:00.00000', '21:17:00.00000', '21:26:00.00000', '9'), (29, 6, 2, '21:07:00.00000', '21:17:00.00000', '21:28:00.00000', '21:39:00.00000', '8'), (30, 4, 2, '21:07:00.00000', '21:24:00.00000', '21:34:00.00000', '21:51:00.00000', '9'); -- -------------------------------------------------------- -- -- Table structure for table `waitstaff` -- CREATE TABLE `waitstaff` ( `ID` int(1) NOT NULL, `Name` varchar(8) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `waitstaff` -- INSERT INTO `waitstaff` (`ID`, `Name`) VALUES (1, 'Terrance'), (2, 'Jennifer'); -- -- Indexes for dumped tables -- -- -- Indexes for table `chef` -- ALTER TABLE `chef` ADD PRIMARY KEY (`ID`); -- -- Indexes for table `customer` -- ALTER TABLE `customer` ADD PRIMARY KEY (`ID`); -- -- Indexes for table `inventory` -- ALTER TABLE `inventory` ADD PRIMARY KEY (`ID`); -- -- Indexes for table `meal` -- ALTER TABLE `meal` ADD PRIMARY KEY (`ID`); -- -- Indexes for table `menu` -- ALTER TABLE `menu` ADD PRIMARY KEY (`ID`); -- -- Indexes for table `prepares` -- ALTER TABLE `prepares` ADD PRIMARY KEY (`ID`); -- -- Indexes for table `tables` -- ALTER TABLE `tables` ADD PRIMARY KEY (`ID`); -- -- Indexes for table `visit` -- ALTER TABLE `visit` ADD PRIMARY KEY (`ID`); -- -- Indexes for table `waitstaff` -- ALTER TABLE `waitstaff` ADD PRIMARY KEY (`ID`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `chef` -- ALTER TABLE `chef` MODIFY `ID` int(1) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `customer` -- ALTER TABLE `customer` MODIFY `ID` int(1) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT for table `inventory` -- ALTER TABLE `inventory` MODIFY `ID` int(2) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- AUTO_INCREMENT for table `meal` -- ALTER TABLE `meal` MODIFY `ID` int(2) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31; -- -- AUTO_INCREMENT for table `menu` -- ALTER TABLE `menu` MODIFY `ID` int(2) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `prepares` -- ALTER TABLE `prepares` MODIFY `ID` int(2) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23; -- -- AUTO_INCREMENT for table `tables` -- ALTER TABLE `tables` MODIFY `ID` int(1) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `visit` -- ALTER TABLE `visit` MODIFY `ID` int(2) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31; -- -- AUTO_INCREMENT for table `waitstaff` -- ALTER TABLE `waitstaff` MODIFY `ID` int(1) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;