add review and read review now done

This commit is contained in:
Mann Patel
2025-04-12 13:10:17 -06:00
parent 0e32389482
commit 0f8bb622a4
16 changed files with 408 additions and 196 deletions

View File

@@ -101,7 +101,8 @@ CREATE TABLE Favorites (
UserID INT,
ProductID INT,
FOREIGN KEY (UserID) REFERENCES User (UserID),
FOREIGN KEY (ProductID) REFERENCES Product (ProductID)
FOREIGN KEY (ProductID) REFERENCES Product (ProductID),
UNIQUE (UserID, ProductID) -- Prevents duplicate favorites
);
-- Product-Category Junction Table (Many-to-Many)