DBMS Final Project Report
DBMS Final Project Report
DATABASE
MANAGEMENT
SYSTEM
PROJECT REPORT
FIT.IO
A better Health and Fitness platform
that integrates into your daily life and
rewards a healthy lifestyle
Abstract
The health and fitness industry is one of great
importance in our lives, and promoting a healthy lifestyle
is essential in current times where unhealthy foods are
so glorified and popularised in the world. We aimed to
make a platform that integrates and keeps record of
your daily lifestyle habits and motivates you to be more
active and healthy.
3 of 35
Week 1
Ideation and finalisation of
the application, and
identifying stakeholders
Work Division:
All work was done together
and everyone contributed
equally.
4 of 35
Project Description
A platform which constantly keeps track of user calorie
5. Link user account, and share daily lifestyle statistics with your
dietician’s account to directly receive feedback about your
current calorie intake, and suggestions regarding your
workout regimen.
5 of 35
• Hospitals
• Restaurants
• Healthcare Industry
1. Dieticians
2. Product Manufacturers
• Insurance Companies
6 of 35
Week 2
Work Division:
All work was done together
and everyone contributed
equally.
7 of 35
Stakeholder Roles
Users
• Targeted Users
Hospitals
Healthcare Industry
• Dieticians
1. Dietician Account.
8 of 35
• Product Manufacturers
Insurance
Restaurants
• Food suggestions
User:
2: What foods can I eat which are healthy for me based on the
calories?
9 of 35
Hospitals:
Product Manufacturers:
Restaurants:
2: How many users have ordered more than once from us?
Insurance Companies:
Week 3
Work Division:
All work was done together
and everyone contributed
equally.
Note: The following schema is only a tentative schema which can be revised and
updated in following weeks
12 of 35
DATABASE SCHEMA
USER DB
users -
User_ID int
NotNull
Name varchar(30)
NotNull
Age int
NotNull
at_risk bit
Dietician_ID int
No_of_steps int
Current_calorie int
Health_History MEDIUMTEXT
Avg_Calorie_Intake int
Diseases TEXT
Location TEXT
NotNull
Primary Key - User_ID
daily_record_n
13 of 35
date int
NotNull
steps int
cal_intake int
avg_heart_rate float
sleep int
at_risk-
U_ID int
NotNull
disease Varchar
NotNull
at_risk TINYINT
NotNull
HOSPITAL -
Name varchar(40)
NotNull
Location TEXT
at_risk bit
14 of 35
Specialities TEXT
Hospital_ID int
NotNull
Primary Key - Hospital_ID
RESTAURANTS-
Name varchar(30)
NotNull
Location TEXT
Rating int
Cuisines varchar(40)
NotNull
Restaurant_ID int
NotNull
Menu MEDIUMTEXT
Primary Key - Restaurant_ID
PRODUCT MANUFACTURERS-
Product_ID int
NotNull
Name varchar(30)
NotNull
15 of 35
typeofProduct varchar(70)
NotNull
Coupons int
NotNull
Primary Key - Product_ID
DIETICIANS-
Dietician_ID int
NotNull
Name varchar(30)
NotNull
Qualification TEXT
Rating int
NotNull
Primary Key - Dietician_ID
HEALTH INSURANCE-
Insurance_ID int
NotNull
Name varchar(30)
NotNull
Clients MEDIUMTEXT
Possible_Clients MEDIUMTEXT
Primary Key - Insurance_ID
16 of 35
COUPONS-
Coupon_ID int
NotNull
Valid_date date
NotNull
Type varchar(70)
NotNull
Details varchar(30)
Product_ID int
NotNull
Primary Key - Coupon_ID
FOOD-
Name varchar(30)
NotNull
Calorie int
NotNull
Cuisine varchar(20)
NotNull
Recipe varchar(100)
Primary Key - Name
MANAGES (User-Dietician)
17 of 35
User_ID int
NotNull
Dietician_ID int
NotNull
Primary Key - User_ID
18 of 35
Week 4&5
Work Division:
Udhvarg: Populating Coupons and product_manufacturers,
Document updation
Archit: Populating User and daily_record_n
Hamzah: Populating Restaurants and Menu
Shaney: Populating Dieticians and Health_Insurance
Gavish: Populating Hospital and food
19 of 35
All the tables have been populated with at least 50 entries for now.
Week 6
Work Division:
Udhvarg: Creating Indexes,
Document Updation
Gavish: Forming Queries
21 of 35
Indexes
• CREATE UNIQUE INDEX `user_index_0` ON `user` (`id`);
`datetime_e`);
`datetime_c`);
(`id`);
(`oid`);
(`code`);
`productmanufacturers` (`id`);
Queries
1: How much money is made from orders placed after midnight before
closing time on 26th april?
2020 userorder
2: How many users have ordered more than once from us?
FCount(*)(at_risk_users)
Select * from dietician where rating in (select Max(rating) from dietician where price >
(select AVG(price) from dietician));
10: what is the average calorie intake for all the users in breakfast dinner and lunch.
Week 7
Work Division:
Hamzah, Archit : Embedded SQL Queries
Udhvarg: Document Updation
26 of 35
Week 8
ER Model
Work Division:
Udhvarg: Normalisation, ER Model and
Diagram w. Revisions, Document Updation,
Refactoring population scripts and populating
according to the new schema.
Archit, Hamzah, Shaney, Gavish: Refactoring
population scripts and populating according to
the new schema.
30 of 35
Week 9-12
Work Division:
Archit : Back-end, Collaborative Filter and
Platform Deployment
Hamzah: Back-End, Linking Back-end and
Front-end
Shaney: Front-end of the Platform
Udhvarg: Team Management and Document
Updation
32 of 35
Bonus/Innovative Feature:
Fully Deployed Web-App built from scratch, implementing
features like:
at-risk patients.
our platform.