Personalized Recipes

Tables (5)

Ingredient

  • ingredient_id (Key) — INT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • nutrition_info — VARCHAR(500)
  • allergy_info — VARCHAR(50)
  • user_id (Key2) — INT — Foreign key → User.user_id — NOT NULL
  • weight_in_grams — FLOAT

Recipe

  • recipe_id (Key) — INT — Primary key — NOT NULL
  • title — VARCHAR(15) — NOT NULL
  • description — TEXT
  • category — VARCHAR(50)
  • image — BLOB
  • cooking_time — INT
  • difficulty — VARCHAR(5)

Recipe_Ingredient

  • recipe_id — INT — Foreign key → Recipe.recipe_id — NOT NULL
  • ingredient_id — INT — Foreign key → Ingredient.ingredient_id — NOT NULL

User

  • user_id (Key) — INT — Primary key — NOT NULL
  • name — VARCHAR(10) — NOT NULL
  • age — INT
  • gender — VARCHAR(2)
  • is_pregnant — BOOLEAN
  • health_status — VARCHAR(50)
  • allergy — VARCHAR(50)
  • preference — VARCHAR(100)
  • nickname — VARCHAR(10)

User_recipe

  • user_id — INT — Foreign key → User.user_id — NOT NULL
  • recipe_id — INT — Foreign key → Recipe.recipe_id — NOT NULL