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

Database Schema

The document outlines the database schema for a nutrition tracking application, including tables for users, nutritionists, appointments, messages, notifications, reviews and ratings, progress tracking, meal plans, and payments. The schema includes fields for user details, nutritionist services and pricing, appointment details, message content and timestamps, notification content and timestamps, reviews, tracked user weight and activities, meal plans, and payment amounts and dates. Relationships between the tables are defined using foreign keys.

Uploaded by

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

Database Schema

The document outlines the database schema for a nutrition tracking application, including tables for users, nutritionists, appointments, messages, notifications, reviews and ratings, progress tracking, meal plans, and payments. The schema includes fields for user details, nutritionist services and pricing, appointment details, message content and timestamps, notification content and timestamps, reviews, tracked user weight and activities, meal plans, and payment amounts and dates. Relationships between the tables are defined using foreign keys.

Uploaded by

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

Users Nutritionists Appointments Messages

user_id SERIAL 1 1 nutritionist_id SERIAL 1 appointment_id SERIAL message_id SERIAL

username VARCHAR username VARCHAR * user_id INT * sender_id INT

password VARCHAR password VARCHAR * nutritionist_id INT * receiver_id INT

email VARCHAR email VARCHAR appointment_date DATE message_content VARCHAR

name VARCHAR name VARCHAR appointment_time TIME timestamp TIMESTAMP

age INT age INT status VARCHAR

address VARCHAR address VARCHAR


Notifications
height FLOAT services VARCHAR
ReviewsAndRatings notification_id SERIAL
weight FLOAT pricing VARCHAR
review_id SERIAL * user_id INT
gender VARCHAR rating FLOAT
* user_id INT notification_content VARCHAR
activity_level VARCHAR
* nutritionist_id INT timestamp TIMESTAMP
dietary_restrictions VARCHAR
ProgressTracking rating FLOAT
health_conditions VARCHAR
tracking_id SERIAL review_content VARCHAR

* user_id INT

MealPlans weight FLOAT

plan_id SERIAL calorie_intake INT

nutritionist_id INT * exercise_log VARCHAR

user_id INT *

plan_details VARCHAR

dietary_requirements VARCHAR

health_goals VARCHAR

Payments

payment_id SERIAL

user_id INT *

nutritionist_id INT *

amount FLOAT

payment_date DATE
Users Nutritionists Appointments Messages

user_id SERIAL 1 1 nutritionist_id SERIAL 1 appointment_id SERIAL message_id SERIAL

username VARCHAR username VARCHAR * user_id INT * sender_id INT

password VARCHAR password VARCHAR * nutritionist_id INT * receiver_id INT

email VARCHAR email VARCHAR appointment_date DATE message_content VARCHAR

name VARCHAR name VARCHAR appointment_time TIME timestamp TIMESTAMP

age INT age INT status VARCHAR

address VARCHAR address VARCHAR


Notifications
height FLOAT services VARCHAR
ReviewsAndRatings notification_id SERIAL
weight FLOAT pricing VARCHAR
review_id SERIAL * user_id INT
gender VARCHAR rating FLOAT
* user_id INT notification_content VARCHAR
activity_level VARCHAR
* nutritionist_id INT timestamp TIMESTAMP
dietary_restrictions VARCHAR
ProgressTracking rating FLOAT
health_conditions VARCHAR
tracking_id SERIAL review_content VARCHAR

* user_id INT

MealPlans weight FLOAT

plan_id SERIAL calorie_intake INT

nutritionist_id INT * exercise_log VARCHAR

user_id INT *

plan_details VARCHAR

dietary_requirements VARCHAR

health_goals VARCHAR

Payments

payment_id SERIAL

user_id INT *

nutritionist_id INT *

amount FLOAT

payment_date DATE

You might also like