-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Server version: 8.0.31
-- PHP Version: 7.4.33

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
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 utf8mb4 */;

--
-- Database: `digitalwave`
--

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

--
-- Table structure for table `Customer`
--

CREATE TABLE `Customer` (
  `id` int NOT NULL,
  `first_name` varchar(24) COLLATE utf8mb4_general_ci NOT NULL,
  `last_name` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `email` varchar(56) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `phone_number` varchar(16) COLLATE utf8mb4_general_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `Customer`
--

INSERT INTO `Customer` (`id`, `first_name`, `last_name`, `dob`, `email`, `phone_number`) VALUES
(1, 'Sterne', 'Clist', '1994-02-18', 'sclist0@live.com', '192-118-3633'),
(2, 'Electra', 'Bourges', '1983-11-15', 'ebourges1@nba.com', ''),
(3, 'Norry', 'Tohill', '1981-03-08', 'ntohill2@plala.or.jp', '598-943-0668'),
(4, 'Rebeca', 'Lait', '1987-06-06', '', '407-160-7401'),
(5, 'Cyb', 'Rogerot', '1998-12-12', 'crogerot4@biblegateway.com', '282-396-6382'),
(6, 'Rhona', 'Sharrard', '1998-12-15', 'rsharrard5@imgur.com', ''),
(7, 'Lars', 'Snyder', '1984-05-14', 'lsnyder6@acquirethisname.com', '721-318-2115'),
(8, 'Opal', 'Buckler', '1996-07-25', 'obuckler7@studiopress.com', '986-718-5567'),
(9, 'Bell', 'Avent', '1980-02-26', 'bavent8@scribd.com', '336-578-7486'),
(10, 'Jerad', 'De Filippo', '1986-06-02', 'jdefilippo9@ucla.edu', ''),
(11, 'Pasquale', 'Brixey', '1983-05-31', 'pbrixeya@vkontakte.ru', '422-930-8910'),
(12, 'Melly', 'Prandoni', '1997-07-21', 'mprandonib@ebay.co.uk', '215-305-7278'),
(13, 'Orlan', 'Scarr', '1995-03-27', 'oscarrc@mail.ru', ''),
(14, 'Gearard', 'Grindlay', '1998-05-11', 'ggrindlayd@squarespace.com', '892-885-6483'),
(15, 'Berk', 'Hickisson', '1990-05-22', 'bhickissone@behance.net', '938-575-3748'),
(16, 'Janel', 'Gumbley', '1980-07-15', 'jgumbleyf@cbsnews.com', '993-532-2999'),
(17, 'Lisabeth', 'Lauritsen', '1999-03-29', 'llauritseng@amazonaws.com', '469-671-8573'),
(18, 'Gerda', 'Parlett', '1984-11-11', 'gparletth@mozilla.org', ''),
(19, 'Georas', 'Pash', '1992-03-06', 'gpashi@comsenz.com', ''),
(20, 'Ashton', 'Gore', '1984-01-01', 'agorej@spiegel.de', '967-465-2376'),
(21, 'Leon', 'Fyfe', '2002-02-12', 'lfyfek@typepad.com', '406-874-9686'),
(22, 'Ximenez', 'Goggin', '1994-04-01', 'xgogginl@msn.com', '385-348-6457'),
(23, 'Diannne', 'Jevon', '1994-10-19', 'djevonm@t-online.de', '754-719-0543'),
(24, 'Cher', 'Hurlin', '1984-08-25', 'churlinn@amazon.com', ''),
(25, 'Lilian', 'Golthorpp', '1997-06-21', 'lgolthorppo@shareasale.com', ''),
(26, 'Nicholle', 'Coughtrey', '2000-06-08', 'ncoughtreyp@answers.com', '969-365-3561'),
(27, 'Andris', 'Rubenczyk', '2000-10-03', 'arubenczykq@alibaba.com', '709-936-8229'),
(28, 'Kendre', 'Spataro', '2000-06-26', 'kspataror@sina.com.cn', ''),
(29, 'Victoria', 'Dyne', '1980-06-07', 'vdynes@adobe.com', ''),
(30, 'Alyce', 'Davidi', '1995-02-17', 'adavidit@jugem.jp', '772-869-8174'),
(31, 'Lemmie', 'Talmadge', '1984-10-10', 'ltalmadgeu@mapy.cz', ''),
(32, 'Hedi', 'Matthiae', '1989-04-10', 'hmatthiaev@nhs.uk', '875-459-4439'),
(33, 'Vinny', 'Monger', '1983-10-07', 'vmongerw@imdb.com', '386-110-7193'),
(34, 'Bancroft', 'Simioni', '1996-02-05', 'bsimionix@tripod.com', '507-898-0874'),
(35, 'Alwyn', 'Newvill', '1981-05-01', 'anewvilly@photobucket.com', ''),
(36, 'Dalli', 'Deamer', '1993-08-06', 'ddeamerz@tamu.edu', '989-824-8112'),
(37, 'Orson', 'Backhouse', '1983-08-30', '', '897-104-9119'),
(38, 'Billy', 'Kerwin', '1987-11-22', 'bkerwin11@skyrock.com', '955-666-2578'),
(39, 'Catlee', 'Poone', '1985-05-22', 'cpoone12@gov.uk', '311-320-5902'),
(40, 'Rayshell', 'Graine', '1985-12-20', 'rgraine13@taobao.com', ''),
(41, 'Bree', 'Ballister', '1995-11-06', 'bballister14@census.gov', ''),
(42, 'Jess', 'Glyde', '1998-10-06', 'jglyde15@mapquest.com', '281-489-2641'),
(43, 'Opal', 'Bradshaw', '1980-03-07', 'obradshaw16@noaa.gov', '513-975-1827'),
(44, 'Orion', 'Hansmann', '2001-07-10', 'ohansmann17@xing.com', '168-410-3103'),
(45, 'Marillin', 'Sleeman', '1995-02-28', 'msleeman18@hubpages.com', '424-551-5030'),
(46, 'Edlin', 'Labbet', '1983-09-18', 'elabbet19@weebly.com', ''),
(47, 'Darsie', 'Gartside', '1992-05-07', 'dgartside1a@stanford.edu', ''),
(48, 'Letty', '', '1989-09-21', 'lmullins1b@alexa.com', '424-863-3678'),
(49, 'Marsiella', 'Broszkiewicz', '1986-03-16', 'mbroszkiewicz1c@weather.com', ''),
(50, 'Tillie', 'Wannop', '1989-04-02', 'twannop1d@sina.com.cn', '766-505-9567');

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

--
-- Table structure for table `Employee`
--

CREATE TABLE `Employee` (
  `id` int NOT NULL,
  `first_name` varchar(24) COLLATE utf8mb4_general_ci NOT NULL,
  `last_name` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `salary` int DEFAULT NULL,
  `role` varchar(24) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `store_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `Employee`
--

INSERT INTO `Employee` (`id`, `first_name`, `last_name`, `salary`, `role`, `store_id`) VALUES
(1, 'Julee', 'Slarke', 177644, 'manager', 7),
(2, 'Zacharias', 'Chalkly', 197424, 'manager', 7),
(3, 'Elsie', 'Edington', 187827, 'manager', 5),
(4, 'Marylin', 'Powner', 84161, 'manager', 4),
(5, 'Hedvige', 'Worvill', 133896, 'manager', 6),
(6, 'Baron', 'McAllester', 57005, 'cashier', 12),
(7, 'Robbie', 'Meighan', 37970, 'worker', 10),
(8, 'Selie', 'Spinige', 56020, 'cashier', 5),
(9, 'Kelly', 'Glew', 176914, 'owner', 2),
(10, 'Hubie', 'Danks', 116120, 'manager', 1),
(11, 'Sibilla', 'Billinge', 109505, 'manager', 6),
(12, 'Marleen', 'Garrattley', 83172, 'manager', 12),
(13, 'Katharina', 'Pomphrett', 52998, 'worker', 3),
(14, 'Louis', 'Hare', 162287, 'manager', 10),
(15, 'Channa', 'Chisnall', 167642, 'manager', 2),
(16, 'Gregory', 'Peyton', 107344, 'manager', 4),
(17, 'Kinny', 'Longea', 108151, 'cashier', 7),
(18, 'Staci', 'Guilloux', 157002, 'manager', 1),
(19, 'Rusty', 'Herrieven', 128314, 'owner', 9),
(20, 'Carmine', 'Field', 31912, 'worker', 2),
(21, 'Allie', 'Revelle', 195611, 'owner', 7),
(22, 'Lucienne', 'Klebes', 62049, 'cashier', 10),
(23, 'Monique', 'Scorrer', 97088, 'manager', 7),
(24, 'Silvano', 'Lochrie', 48298, 'worker', 4),
(25, 'Rafe', 'Bicknell', 133525, 'manager', 2),
(26, 'Meta', 'Yeoland', 51421, 'cashier', 12),
(27, 'Maribel', 'Whightman', 50290, 'cashier', 8),
(28, 'Rosemarie', 'Whichelow', 102430, 'manager', 4),
(29, 'Germaine', 'Isaksson', 115291, 'manager', 6),
(30, 'Elva', 'Jefferd', 119002, 'manager', 12);

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

--
-- Table structure for table `Inventory`
--

CREATE TABLE `Inventory` (
  `id` int NOT NULL,
  `store_id` int NOT NULL,
  `product_id` int NOT NULL,
  `quantity` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `Inventory`
--

INSERT INTO `Inventory` (`id`, `store_id`, `product_id`, `quantity`) VALUES
(1, 1, 3, 15),
(2, 1, 8, 8),
(3, 1, 10, 20),
(4, 2, 2, 10),
(5, 2, 5, 5),
(6, 2, 7, 12),
(7, 3, 1, 18),
(8, 3, 4, 25),
(9, 3, 9, 7),
(10, 3, 11, 3),
(11, 4, 6, 15),
(12, 4, 12, 9),
(13, 5, 14, 10),
(14, 5, 15, 4),
(15, 6, 17, 20),
(16, 6, 28, 12),
(17, 6, 19, 15),
(18, 6, 20, 6),
(19, 7, 21, 7),
(20, 7, 22, 3),
(21, 8, 23, 5),
(22, 8, 4, 10),
(23, 8, 25, 8),
(24, 9, 26, 6),
(25, 9, 27, 12),
(26, 10, 29, 9),
(27, 10, 30, 7),
(28, 11, 2, 3),
(29, 11, 23, 5),
(30, 11, 4, 4),
(31, 12, 16, 8),
(32, 12, 28, 10);

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

--
-- Table structure for table `Product`
--

CREATE TABLE `Product` (
  `id` int NOT NULL,
  `name` varchar(56) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `description` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `Product`
--

INSERT INTO `Product` (`id`, `name`, `description`) VALUES
(1, 'Dell UltraSharp 27-Inch Monitor', '27-inch IPS Display, 2560x1440 Resolution, 99% sRGB coverage, HDMI/DisplayPort Connectivity'),
(2, 'Logitech G502 Hero Gaming Mouse', 'High-Performance Gaming Mouse, 16000 DPI, 11 Programmable Buttons, Adjustable Weight'),
(3, 'Samsung 1TB SSD', 'Solid State Drive, SATA III Interface, Read Speeds up to 550MB/s, Write Speeds up to 520MB/s'),
(4, 'Bose QuietComfort 35 Wireless Headphones', 'Wireless Noise-Canceling Headphones, 20-hour Battery Life, Bluetooth Connectivity'),
(5, 'TP-Link Archer AX6000 Wi-Fi Router', 'High-Speed Wi-Fi Router, Dual-Band, 8 Gigabit LAN Ports, MU-MIMO Technology'),
(6, 'Seagate Backup Plus 4TB External Hard Drive', 'USB 3.0 Portable Hard Drive, PC/Mac Compatible, Automatic Backup Software Included'),
(7, 'Razer BlackWidow Mechanical Gaming Keyboard', 'Mechanical Gaming Keyboard, RGB Backlighting, Programmable Macros, Razer Green Switches'),
(8, 'Apple MacBook Air', '13.3-inch Retina Display, Intel Core i5 Processor, 8GB RAM, 256GB SSD, macOS'),
(9, 'Canon PIXMA Wireless All-In-One Printer', 'Wireless Inkjet Printer, Print/Copy/Scan, Auto Duplex Printing, Mobile Printing Support'),
(10, 'Anker PowerPort 6 USB Wall Charger', '6-Port USB Charger, 60W Power Output, MultiProtect Safety System'),
(11, 'LG 27-Inch UltraGear Gaming Monitor', '27-inch QHD IPS Display, 144Hz Refresh Rate, NVIDIA G-SYNC Compatible, HDR10 Support'),
(12, 'Sony WH-1000XM4 Wireless Noise-Canceling Headphones', 'Premium Over-Ear Headphones, 30-hour Battery Life, Adaptive Sound Control'),
(13, 'Western Digital Elements 2TB Hard Drive', 'USB 3.0 Portable Hard Drive, Plug-and-Play, Compact and Lightweight Design'),
(14, 'Logitech C920 HD Pro Webcam', 'Full HD 1080p Video Calling, Dual Stereo Microphones, Automatic Light Correction'),
(15, 'AMD Ryzen 7 5800X Processor', '8-Core Desktop Processor, Up to 4.7 GHz Max Boost, AM4 Socket, Wraith Prism Cooler Included'),
(16, 'Corsair Vengeance RGB Pro 32GB DDR4 RAM', 'High-Performance RGB Memory, 3200MHz, DDR4, C16, XMP 2.0 Support'),
(17, 'Samsung 34-Inch Ultrawide Curved Monitor', '34-inch QHD Ultrawide Display, 100Hz Refresh Rate, AMD FreeSync, Built-in Speakers'),
(18, 'Apple AirPods Pro', 'Wireless Earbuds with Active Noise Cancellation, Transparency Mode, and Wireless Charging Case'),
(19, 'TP-Link Deco M9 Plus Mesh Wi-Fi System', 'Whole Home Wi-Fi Coverage, Tri-Band, Up to 6500 sq. ft. Coverage, Smart Hub Features'),
(20, 'EVGA GeForce RTX 3060 Ti Graphics Card', '8GB GDDR6, Ray Tracing, DLSS Support, RGB LED, Triple Fan Cooling'),
(21, 'Logitech MX Master 3 Wireless Mouse', 'Advanced Wireless Mouse, Darkfield High-Precision Sensor, USB-C Charging'),
(22, 'Crucial MX500 1TB SSD', '2.5-inch Internal Solid State Drive, SATA III Interface, Sequential Read/Write Speeds up to 560/510 MB/s'),
(23, 'SteelSeries Arctis 7 Gaming Headset', 'Wireless Gaming Headset, DTS Headphone:X v2.0 Surround Sound, ClearCast Microphone'),
(24, 'ASUS ROG Strix B550-F Gaming Motherboard', 'ATX Form Factor, AMD AM4 Socket, PCIe 4.0, DDR4, Aura Sync RGB Lighting'),
(25, 'Samsung T5 Portable SSD 500GB', 'USB 3.1 External Solid State Drive, Up to 540 MB/s Transfer Speed, Shock-resistant Design'),
(26, 'HyperX Cloud Alpha S Gaming Headset', 'Wired Gaming Headset, 7.1 Surround Sound, Detachable Noise-Canceling Microphone'),
(27, 'Gigabyte GeForce GTX 1660 Super Graphics Card', '6GB GDDR6, WINDFORCE 2X Cooling System, HDMI/DisplayPort, RGB Fusion'),
(28, 'Seagate Barracuda 4TB Internal Hard Drive', '3.5-inch SATA III Hard Drive, 5400 RPM, 256MB Cache, Desktop HDD'),
(29, 'Razer DeathAdder V2 Gaming Mouse', 'Optical Gaming Mouse, 20K DPI Optical Sensor, 8 Programmable Buttons'),
(30, 'Logitech G Pro X Mechanical Gaming Keyboard', 'Compact TKL Design, Detachable Cable, GX Blue Clicky Switches');

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

--
-- Table structure for table `Sale`
--

CREATE TABLE `Sale` (
  `id` int NOT NULL,
  `store_id` int NOT NULL,
  `customer_id` int NOT NULL,
  `employee_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `Sale`
--

INSERT INTO `Sale` (`id`, `store_id`, `customer_id`, `employee_id`) VALUES
(1, 5, 23, 12),
(2, 9, 41, 8),
(3, 3, 15, 19),
(4, 7, 36, 5),
(5, 2, 9, 28),
(6, 12, 47, 14),
(7, 1, 32, 2),
(8, 6, 4, 21),
(9, 10, 27, 16),
(10, 4, 50, 30);

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

--
-- Table structure for table `SaleProduct`
--

CREATE TABLE `SaleProduct` (
  `id` int NOT NULL,
  `product_id` int NOT NULL,
  `sale_id` int NOT NULL,
  `quantity` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `SaleProduct`
--

INSERT INTO `SaleProduct` (`id`, `product_id`, `sale_id`, `quantity`) VALUES
(1, 3, 1, 2),
(2, 8, 1, 1),
(3, 5, 1, 3),
(4, 7, 2, 2),
(5, 1, 2, 1),
(6, 9, 2, 2),
(7, 4, 3, 1),
(8, 6, 3, 3),
(9, 10, 4, 1),
(10, 11, 4, 2),
(11, 2, 5, 3),
(12, 12, 5, 1),
(13, 3, 6, 1),
(14, 7, 6, 1),
(15, 8, 6, 2),
(16, 9, 7, 3),
(17, 1, 7, 1),
(18, 2, 7, 2),
(19, 5, 8, 2),
(20, 6, 8, 1),
(21, 10, 8, 1),
(22, 3, 9, 1),
(23, 7, 9, 2),
(24, 8, 9, 1),
(25, 9, 10, 3),
(26, 1, 10, 1),
(27, 4, 10, 2);

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

--
-- Table structure for table `Store`
--

CREATE TABLE `Store` (
  `id` int NOT NULL,
  `location_name` varchar(32) COLLATE utf8mb4_general_ci NOT NULL,
  `address` varchar(56) COLLATE utf8mb4_general_ci NOT NULL,
  `postcode` int NOT NULL,
  `city` varchar(32) COLLATE utf8mb4_general_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `Store`
--

INSERT INTO `Store` (`id`, `location_name`, `address`, `postcode`, `city`) VALUES
(1, 'Perth CBD', '135 William St', 6000, 'Perth'),
(2, 'Bentley', 'Unit 1, 1083 Albany Highway', 6102, 'Perth'),
(3, 'Cockburn', 'Unit 2, 30 Hammond Road', 6164, 'Perth'),
(4, 'Osbourne Park', 'Unit 3, 3 King Edward Road', 6017, 'Perth'),
(5, 'Wangara', 'Unit 1, 46 Buckingham Drive', 6065, 'Perth'),
(6, 'Heatherton', 'Unit 40, 1 Kingston Road', 3202, 'Sydney'),
(7, 'Lidcombe', 'Unit B1/3/29 Birnie Ave', 2141, 'Sydney'),
(8, 'Marrickville', '149 Marrickville Rd', 2204, 'Sydney'),
(9, 'Miranda', '535 Kingsway', 2228, 'Melbourne'),
(10, 'Adelaide CBD', '308 Pulteney St', 5000, 'Adelaide'),
(11, 'Hope Valley', '1271 Grand Jct Rd', 5090, 'Adelaide'),
(12, 'Woodville Park', '11 Kilkenny Rd', 5011, 'Adelaide');

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `Employee`
--
ALTER TABLE `Employee`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `Inventory`
--
ALTER TABLE `Inventory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `product_id` (`product_id`);

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

--
-- Indexes for table `Sale`
--
ALTER TABLE `Sale`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `customer_id` (`customer_id`),
  ADD KEY `employee_id` (`employee_id`);

--
-- Indexes for table `SaleProduct`
--
ALTER TABLE `SaleProduct`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_id` (`product_id`),
  ADD KEY `sale_id` (`sale_id`);

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `Customer`
--
ALTER TABLE `Customer`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=51;

--
-- AUTO_INCREMENT for table `Employee`
--
ALTER TABLE `Employee`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;

--
-- AUTO_INCREMENT for table `Inventory`
--
ALTER TABLE `Inventory`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;

--
-- AUTO_INCREMENT for table `Product`
--
ALTER TABLE `Product`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;

--
-- AUTO_INCREMENT for table `Sale`
--
ALTER TABLE `Sale`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `SaleProduct`
--
ALTER TABLE `SaleProduct`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;

--
-- AUTO_INCREMENT for table `Store`
--
ALTER TABLE `Store`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `Employee`
--
ALTER TABLE `Employee`
  ADD CONSTRAINT `employee_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `Store` (`id`);

--
-- Constraints for table `Inventory`
--
ALTER TABLE `Inventory`
  ADD CONSTRAINT `inventory_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `Store` (`id`),
  ADD CONSTRAINT `inventory_ibfk_2` FOREIGN KEY (`product_id`) REFERENCES `Product` (`id`);

--
-- Constraints for table `Sale`
--
ALTER TABLE `Sale`
  ADD CONSTRAINT `sale_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `Store` (`id`),
  ADD CONSTRAINT `sale_ibfk_2` FOREIGN KEY (`customer_id`) REFERENCES `Customer` (`id`),
  ADD CONSTRAINT `sale_ibfk_3` FOREIGN KEY (`employee_id`) REFERENCES `Employee` (`id`);

--
-- Constraints for table `SaleProduct`
--
ALTER TABLE `SaleProduct`
  ADD CONSTRAINT `saleproduct_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `Product` (`id`),
  ADD CONSTRAINT `saleproduct_ibfk_2` FOREIGN KEY (`sale_id`) REFERENCES `Sale` (`id`);
COMMIT;

/*!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 */;
