diff --git a/sqlCode b/sqlCode index 5571df5..2205047 100644 --- a/sqlCode +++ b/sqlCode @@ -3,7 +3,7 @@ DROP TABLE IF EXISTS Recipe; DROP TABLE IF EXISTS Ingredient; DROP TABLE IF EXISTS Cookie; DROP TABLE IF EXISTS Pallet; -DROP TABLE IF EXISTS Order; +DROP TABLE IF EXISTS Orders; DROP TABLE IF EXISTS Customer; CREATE TABLE Customer ( @@ -12,7 +12,7 @@ CREATE TABLE Customer ( address VARCHAR(255) ); -CREATE TABLE Order ( +CREATE TABLE Orders ( order_id INT AUTO_INCREMENT PRIMARY KEY, customer_id INT, delivery_date DATE, @@ -26,7 +26,7 @@ CREATE TABLE Pallet ( manufacture_date DATE, delivery_date DATE, blocked BOOLEAN, - FOREIGN KEY (order_id) REFERENCES Order(order_id) + FOREIGN KEY (order_id) REFERENCES Orders(order_id) ); CREATE TABLE Cookie ( @@ -41,7 +41,7 @@ CREATE TABLE OrderSpec ( cookie_id INT, quantity INT, PRIMARY KEY (order_id, cookie_id), - FOREIGN KEY (order_id) REFERENCES Order(order_id), + FOREIGN KEY (order_id) REFERENCES Orders(order_id), FOREIGN KEY (cookie_id) REFERENCES Cookie(cookie_id) );