Database Management System
Database Management System
program.
PROJECT
Project –I
In this project, the goal is to develop a DBMS that efficiently manages and tracks personalized
nutrition and exercise programs for individual clients. The DBMS will store and retrieve client
information, nutritional data, exercise routines, and health records.
Theory:
The client attribute represents the individuals participating in the program. It includes information
such as the client's name, age, gender, contact details, and any specific health conditions or dietary
restrictions they may have. This information allows the DBMS to create a comprehensive profile for
each client.
The nutrition attribute contains data related to the personalized diet plans. It includes information
such as daily calorie intake, macronutrient distribution (carbohydrates, proteins, and fats), meal
timings, and specific food recommendations. This data is customized based on the client's goals,
preferences, and any health conditions. The DBMS stores and updates this information to provide
clients with accurate and up-to-date nutritional guidance.
The exercise attribute stores information about the personalized exercise routines for each client. It
includes details such as workout types (cardiovascular exercises, strength training, etc.), duration,
intensity levels, frequency, and any modifications or progressions over time. The DBMS maintains
exercise logs and tracks progress to help clients stay consistent and reach their fitness goals
effectively.
The health record attribute is crucial for monitoring and assessing the client's overall health and
progress. It includes information such as body measurements (weight, height, body mass index), vital
signs (blood pressure, heart rate), body composition analysis, and any relevant medical test results.
The DBMS securely stores this data, allowing clients and professionals to review historical health
records and track changes over time.
With this DBMS, nutritionists, trainers, and clients can collaborate effectively. Nutritionists can access
the client's health records, analyze nutritional data, and make adjustments to the diet plans
accordingly. Trainers can review exercise routines, track client progress, and provide feedback or
modifications to ensure optimal fitness outcomes. Clients can access their personalized information,
record their meals and workouts, and track their health and fitness journey.
The ER-diagram :
gender: This attribute represents the gender of the client and is stored as a string. It can have
values such as "Male," "Female," or "Non-binary."
height: This attribute represents the height of the client and is stored as a floating-point
number. The unit of measurement can be specified, such as centimeters or meters.
weight: This attribute represents the weight of the client and is stored as a floating-point
number. The unit of measurement can be specified, such as kilograms or pounds.
client_name: This attribute stores the name of the client as a string. The maximum length is
set to 50 characters, but you can adjust it according to your requirements.
goal_weight: This attribute represents the target weight that the client aims to achieve and is
stored as a floating-point number. The unit of measurement can be the same as the weight
attribute.
goal_deadline: This attribute represents the deadline or target date by which the client aims
to achieve their goal weight. It is stored as a DATE data type.
client_id: This attribute is a foreign key referencing the client_id from the "Client" table. It
establishes a relationship between the program entry and the corresponding client.
start_date: This attribute represents the start date of the program and is stored as a DATE
data type.
end_date: This attribute represents the end date or target completion date of the program
and is stored as a DATE data type.
nutrition_goal: This attribute stores the nutrition-related goal or objective for the program as
text. It can provide details about the desired outcomes or specific targets to be achieved.
exercise_goal: This attribute stores the exercise-related goal or objective for the program as
text. It can specify the desired fitness outcomes or specific targets to be achieved.
nutrition_plan: This attribute stores the detailed nutrition plan for the program as text. It can
include information about recommended dietary guidelines, meal plans, and food choices.
program_status: This attribute represents the current status of the program (e.g., ongoing,
completed, paused) and is stored as a string. The maximum length is set to 20 characters.
notes: This attribute allows for any additional notes or comments related to the program and
is stored as text.
The foreign key constraint (FOREIGN KEY) ensures that the client_id references an existing client in the
"Client" table.
client_id: This attribute is a foreign key referencing the client_id from the "Client" table. It
establishes a relationship between the nutrition entry and the corresponding client.
program_id: This attribute is a foreign key referencing the program_id from the "Program"
table (assuming a separate table for program information). It establishes a relationship
between the nutrition entry and the specific program it belongs to.
date: This attribute represents the date of the nutrition entry and is stored as a DATE data
type.
meal_type: This attribute represents the type of meal (e.g., breakfast, lunch, dinner, snack)
and is stored as a string. The maximum length is set to 20 characters.
calories: This attribute represents the number of calories consumed in the specific meal and is
stored as a floating-point number.
protein: This attribute represents the amount of protein consumed in the specific meal and is
stored as a floating-point number.
carbs: This attribute represents the amount of carbohydrates consumed in the specific meal
and is stored as a floating-point number.
fat: This attribute represents the amount of fat consumed in the specific meal and is stored as
a floating-point number.
sugar: This attribute represents the amount of sugar consumed in the specific meal and is
stored as a floating-point number.
The foreign key constraints (FOREIGN KEY) ensure that the client_id references an existing client in the
"Client" table and the program_id references an existing program in the "Program" table.
client_id: This attribute is a foreign key referencing the client_id from the "Client" table. It
establishes a relationship between the exercise entry and the corresponding client.
program_id: This attribute is a foreign key referencing the program_id from the "Program"
table (assuming a separate table for program information). It establishes a relationship
between the exercise entry and the specific program it belongs to.
exercise_name: This attribute represents the name or description of the exercise and is stored
as a string. The maximum length is set to 50 characters.
duration: This attribute represents the duration of the exercise session in minutes and is stored
as an integer.
calories_burned: This attribute represents the number of calories burned during the exercise
session and is stored as a floating-point number.
intensity_level: This attribute represents the intensity level of the exercise (e.g., low,
moderate, high) and is stored as a string. The maximum length is set to 20 characters.
The foreign key constraints (FOREIGN KEY) ensure that the client_id references an existing client in the
"Client" table and the program_id references an existing program in the "Program" table
client_id: This attribute is a foreign key referencing the client_id from the "Client" table. It
establishes a relationship between the health record entry and the corresponding client.
date: This attribute represents the date of the health record entry and is stored as a DATE data
type.
blood_pressure: This attribute represents the blood pressure reading and is stored as a string.
The maximum length is set to 20 characters to accommodate systolic and diastolic values.
heart_rate: This attribute represents the heart rate (beats per minute) and is stored as an
integer.
blood_sugar: This attribute represents the blood sugar level and is stored as a floating-point
number.
cholesterol: This attribute represents the cholesterol level and is stored as a floating-point
number.
medications: This attribute stores the medications the client is taking as text. It can
accommodate multiple medications and is stored as a TEXT data type.
medical_conditions: This attribute stores information about the client's medical conditions as
text. It can accommodate multiple conditions and is stored as a TEXT data type.
The foreign key constraint (FOREIGN KEY) ensures that the client_id references an existing client in the
"Client" table.
Sql Code:
gender VARCHAR(10),
height FLOAT,
weight FLOAT,
client_name VARCHAR(50),
goal_weight FLOAT,
goal_deadline DATE
);
client_id INT,
start_date DATE,
end_date DATE,
nutrition_goal TEXT,
exercise_goal TEXT,
nutrition_plan TEXT,
program_status VARCHAR(20),
notes TEXT,
);
client_id INT,
program_id INT,
exercise_name VARCHAR(50),
duration INT,
calories_burned FLOAT,
intensity_level VARCHAR(20),
);
client_id INT,
program_id INT,
date DATE,
meal_type VARCHAR(20),
calories FLOAT,
protein FLOAT,
carbs FLOAT,
fat FLOAT,
sugar FLOAT,
);
client_id INT,
date DATE,
blood_pressure VARCHAR(20),
heart_rate INT,
blood_sugar FLOAT,
cholesterol FLOAT,
medications TEXT,
medical_conditions TEXT,
);