recommendation engine 75% polished

This commit is contained in:
Mann Patel
2025-04-03 18:56:39 -06:00
parent 3537e698b1
commit 643b9e357c
11 changed files with 162 additions and 89 deletions

View File

@@ -61,7 +61,7 @@ CREATE TABLE Review (
),
Date DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (UserID) REFERENCES User (UserID),
FOREIGN KEY (ProductID) REFERENCES Product (ProductID)
FOREIGN KEY (ProductID) REFERENCES Pprint(item[0])roduct (ProductID)
);
-- Transaction Entity (Many-to-One with User, Many-to-One with Product)
@@ -77,16 +77,17 @@ CREATE TABLE Transaction (
-- Recommendation Entity (Many-to-One with User, Many-to-One with Product)
CREATE TABLE Recommendation (
RecommendationID_PK INT PRIMARY KEY,
RecommendationID_PK INT AUTO_INCREMENT PRIMARY KEY,
UserID INT,
RecommendedProductID INT,
Date DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (UserID) REFERENCES User (UserID),
FOREIGN KEY (RecommendedProductID) REFERENCES Product (ProductID)
);
-- History Entity (Many-to-One with User, Many-to-One with Product)
CREATE TABLE History (
HistoryID INT PRIMARY KEY,
HistoryID INT AUTO_INCREMENT PRIMARY KEY,
UserID INT,
ProductID INT,
Date DATETIME DEFAULT CURRENT_TIMESTAMP,