Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
34 views2 pages

Schema Sample

The document outlines a database schema for a food-related application, detailing tables for Users, Food Items, Nutrients, and Food_Nutrients, along with their attributes and relationships. It describes functionalities such as user authentication, food item searches with filtering options, and personalized food recommendations based on user preferences. The relationships include one-to-many and many-to-many connections between users, food items, and nutrients.

Uploaded by

AnirudhPavan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views2 pages

Schema Sample

The document outlines a database schema for a food-related application, detailing tables for Users, Food Items, Nutrients, and Food_Nutrients, along with their attributes and relationships. It describes functionalities such as user authentication, food item searches with filtering options, and personalized food recommendations based on user preferences. The relationships include one-to-many and many-to-many connections between users, food items, and nutrients.

Uploaded by

AnirudhPavan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

Users:
 user_id (primary key)
 username
 email (unique)
 password_hash
 dietary_restrictions (optional)

2. Food Items:
 food_id (primary key)
 name
 description
 brand

3. Nutrients:
 nutrient_id (primary key)
 nutrient_name (e.g., "Carbs", "Protein", "Fat")
 unit (e.g., "g", "%")

4. Food_Nutrients:
 food_id (foreign key)
 nutrient_id (foreign key)
 quantity

Relationships:
• One user can have many searches (one-to-many).
• One food item can have many nutrients (many-to-many).
• One nutrient can be associated with many food items (many-to-
many).
Functionalities:
• Login/Registration: Use the Users table for authentication.
• Home Page Search: Search Food Items based on various criteria as
before, including ingredients, brand, etc. Include the ability to filter by
nutrient range (e.g., "high protein").
• Recommended Food: Analyse user searches and preferences to
identify commonly searched nutrients and recommend food items rich in
those nutrients through the Food_Nutrients table.
• Sorting: Implement sorting by various criteria, including nutrient
content.

You might also like