Skip to content
Snippets Groups Projects
Commit bc321ff1 authored by Elferink, A.S. (Amber)'s avatar Elferink, A.S. (Amber)
Browse files

database txts met orders voor een product per bestelling

parent 84435109
No related branches found
No related tags found
No related merge requests found
......@@ -28,17 +28,10 @@ FOREIGN KEY(productid)REFERENCES Products(productid),
CONSTRAINT Category PRIMARY KEY (productid, category)
);
CREATE TABLE OrderProducts (
shoplistid integer not null,
productid integer not null,
quantity integer not null CHECK (quantity > 0),
CONSTRAINT Shop_Prod PRIMARY KEY (shoplistid, productid),
FOREIGN KEY(shoplistid)REFERENCES Shoppinglists(shoplistid),
FOREIGN KEY(productid)REFERENCES Products(productid)
);
CREATE TABLE Orders (
shoplistid integer not null primary key autoincrement,
productid integer not null,
customerid integer not null,
FOREIGN KEY(customerid)REFERENCES Customers(personid)
FOREIGN KEY(productid)REFERENCES Products(productid)
);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment