Skip to content
Unknown integration
DataFrameavailable as
df
variable
CREATE TABLE PorkCuts (
CutID INT PRIMARY KEY,
CutName VARCHAR(255),
Description TEXT
);
CREATE TABLE Recipes (
RecipeID INT PRIMARY KEY,
CutID INT,
Name VARCHAR(255),
PrepTime INT,
CookingInstructions TEXT,
FOREIGN KEY (CutID) REFERENCES PorkCuts(CutID)
);
CREATE TABLE Ingredients (
IngredientID INT PRIMARY KEY,
RecipeID INT,
Name VARCHAR(255),
Quantity DECIMAL(5,2),
Unit VARCHAR(50),
FOREIGN KEY (RecipeID) REFERENCES Recipes(RecipeID)
);
CREATE TABLE Prices (
PriceID INT PRIMARY KEY,
IngredientID INT,
Retailer VARCHAR(255),
Price DECIMAL(5,2),
Date DATE,
FOREIGN KEY (IngredientID) REFERENCES Ingredients(IngredientID)
);
CREATE TABLE RecipeRankings (
RankingID INT PRIMARY KEY,
RecipeID INT,
Rank INT,
Date DATE,
FOREIGN KEY (RecipeID) REFERENCES Recipes(RecipeID)
);
CREATE TABLE UserFeedback (
FeedbackID INT PRIMARY KEY,
RecipeID INT,
UserID INT,
Rating INT,
Comment TEXT,
Date DATE,
FOREIGN KEY (RecipeID) REFERENCES Recipes(RecipeID),
FOREIGN KEY (UserID) REFERENCES Users(UserID)
);
CREATE TABLE Users (
UserID INT PRIMARY KEY,
Name VARCHAR(255),
Email VARCHAR(255)
);