DATABASE DESIGN
FOR
HEALTH DEIT PLANNNER MANAGEMENT
SYSTEM
Admin Login
Field Name Data type Constraint
Username Varchar(20) Not Null
Password Varchar(20) Not Null
User Registration table
Field Name Data type Constraint
User_id Int Primary Key
Name Varchar(20) Not Null
Email id Varchar(20) Not Null
Age Int Not Null
Gender Varchar(20) Not Null
Height_cm Float Not Null
Weight_kg Float Not Null
Fitness_goal Varchar(20) Not Null
Dietary_preference Varchar(20) Not Null
Created_at Timestamp Not Null
Meal Plan table
Field Name Data type Constraint
Meal_id Int Primary Key
User_id Int Foreign Key
Meal_name Varchar(20) Not Null
Meal_type Varchar(20) Not Null
Calories Int Not Null
Ingredients Text Not Null
Instructions Text Not Null
Created_at Timestamp default Not Null
current_timestamp
Exercise Plan table
Field Name Data type Constraint
Exercise_id Int Primary Key
User_id Int Foreign Key
Exercise_name Varchar(20) Not Null
Category Varchar(20) Not Null
Duration_mins Int Not Null
Calories_burned Int Not Null
Instructions Text Not Null
Created_at Timestamp default Not Null
current_timestamp
Task table
Field Name Data type Constraint
Task_id Int Primary Key
User_id Int Foreign Key
Task_name Varchar(20) Not Null
Task_type Int Not Null
Status Varchar(20) Not Null
Due_date Date Not Null
Created_at Timestamp default Not Null
current_timestamp
Progress table
Field Name Data type Constraint
Progress_id Int Primary Key
User_id Int Foreign Key
Date Date Not Null
Weight_kg Float Not Null
Calories_intake Int Not Null
Calories_burned Int Not Null
Tasks_completed Int Not Null
Created_at Timestamp default Not Null
current_timestamp
Payment table
Field Name Data type Constraint
Payment_id Int Primary Key
User_id Int Foreign Key
Plan_name Varchar(20) Not Null
Amount Int Not Null
Payment_status Varchar(20) Not Null
Payment_method Varchar(20) Not Null
Transaction_id Varchar(20) Not Null
Payment_date Timestamp default Not Null
current_timestamp
Expiry_date Date Not Null