You are on page 1of 44

Visvesvaraya Technological University

Belagavi-590 018, Karnataka

A Mini Project Report on

“FITNESS DATABASE”

Mini Project Report submitted in partial fulfilment of the requirement


for the Database Applications Lab [15CSL58]

Bachelor of Engineering
In Computer Science and Engineering

Submitted by

U. KISHORE MALLYA [1JT15CS027]

1
Jyothy Institute of Technology
Tataguni, Bengaluru-560082
Department of Computer Science and Engineering

CERTIFICATE
Certified that the mini project work entitled “Zoo Management Database”
carried out by KISHORE [1JT15CS027] bonafide student of Jyothy Institute
of Technology, in partial fulfilment for the award of Bachelor of Engineering
in Computer Science and Engineering department of the Visvesvaraya
Technological University, Belagavi during the year 2017-2018. It is certified
that all corrections/suggestions indicated for Internal Assessment have been
incorporated in the Report deposited in the departmental library. The project
report has been approved as it satisfies the academic requirements in respect of
Project work prescribed for the said Degree.

2
Mr. Manoj Kumar M Mr. Srinidhi Dr.Prabhanjan S
Guide, Asst. Professor Guide,Asst. Professor professor and HOD
Dept. Of CSE Dept. Of CSE Dept of CSE

Signature with Date:

External Viva Examiner


1.
2.

ACKNOWLEDGEMENT

Firstly, we are very grateful to this esteemed institution “Jyothy Institute of Technology”
for providing us an opportunity to complete our project.

We express our sincere thanks to our Principal Dr. Gopalakrishna K for providing us with
adequate facilities to undertake this project.

We would like to thank Dr. Prabhanjan S Professor and Head of Computer Science and
Engineering Department for providing for his valuable support.

3
We would like to thank our guides Mr. Manoj Kumar M, Asst. Prof. and Mr. Srinidhi
K , Asst. Prof for their keen interest and guidance in preparing this work.

Finally, we would thank all our friends who have helped us directly or indirectly in this
project.

KISHORE [1JT15CS027]

4
ABSTRACT

“In this mini project we have created one application which is easy to access and user
friendly. For this application we used the back end as SQL to store the data which is used in
the application and for the user interface we have used HTML & PHP.The customers can
see a brief view of what a Fitness center looks like and the benefits of going to the Fitness
center

Designed a database system named, Fitness database to maintain the details of the Fitness
center, Number of branches located in Bangalore, Managers for each branch,Staff available
in each branch, Expenses spent by our center for equipment's and finally the details about
the members who have joined our Fitness center .

The Website simplifies the work as well as reduces the efforts while doing it offline . In
this mini project we are able to save the database of all the Branches, Staff,
Expenses,Equipment's, Members Payment and Member data.

The Branch data includes Branch name , Address, Manager, Built date of the branch and
Phone No.

The Staff data includes Staff name, Address, Phone No, Date of Birth and Years of
experience the staff has.The salary and id for staff is not shown in HTML as it is not needed
for the Users who visit the Website.

The Expenses spent by the center is kept in back end as reference which has Expense No,
Expense Name and Amount.This is linked with each branch to keep track of expenses in
each branch.

The Customer data includes Name, Gender, Job, Address, Phone, Email, Start Date, End
Date , Member type(Normal, Silver, Gold, Platinum), Blood Group and Payment No.

5
The Website also contains Register form for customers who want to join. It also has offers
for the customers while joining the fitness center.The Contact us option is also available in
case a user wants to enquire about something, also benefits of joining the fitness center is
given.The career option is also available if anyone wants to be a staff or employee in our
center.

6
Table of Contents

Description Page No.

7
CHAPTER 1
INTRODUCTION

8
 INTRODUCTION

1.1 Introduction to DBMS

A database is simply an organized collection of related data, typically stored on disk,


and accessible by possibly many concurrent users. Databases are generally separated into
application areas. For example, one database may contain Human Resource (employee and
payroll) data; another may contain sales data; another may contain accounting data; and so
on. Databases are managed by a DBMS.

The choice of a database product is often influenced by factors such as:


the computing platform (i.e., hardware, operating system)
 the volume of data to be managed
 the number of transactions required per second
 existing applications or interfaces that an organization may have
 support for heterogeneous and/or distributed computing
 cost
 vendor support

1.2 Introduction to SQL

SQL, which is an abbreviation for Structured Query Language, is a language to request


data from a database, to add, update, or remove data within a database, or to manipulate the
metadata of the database.
SQL is a declarative language in which the expected result or operation is given without the
specific details about how to accomplish the task. The steps required to execute SQL
statements are handled transparently by the SQL database. Sometimes SQL is characterized
as non-procedural because procedural languages generally require the details of the
operations to be specified, such as opening and closing tables, loading and searching
indexes, or flushing buffers and writing data to filesystems. Therefore, SQL is considered to
be designed at a higher conceptual level of operation than procedural languages because the
lower level logical and physical operations aren't specified and are determined by the SQL
engine or server process that executes it.

9
1.3 Introduction to Fitness Center Database

The world in the 21st century is growing up in the technology in every field such as
education, medicine, transport etc. The use of technology makes the world so faster and
easier than the early world and it releases the world from manual usage in the every field.

In the early days, the manual usage causes many mistakes by the user and administrative.
Using manual properties in the fields was not comfortable for the consumers because it was
slower than technical usages, caused wastages of the consumers’ time and contained many
formalities in usage.

This project of using technology in Fitness Centers for Administration, Maintenance of Staff
details, Customer details, Enquiry details,Expenses Details Now also most of the Fitness
centers are using manual programs in their Administration, Maintenance of Staff details,
Customer details, Enquiry details, Expenses Details This project was prepared for using
computerized programs for the above fields. This project was prepared for time saving

and to make the works easier.

1.4 Scope and importance of work

The scope of the project is clear to give a simple and attractive Website to simplify the work
as well as to reduce the efforts while doing it offline.

10
In this mini project we are able to save the database of all the Branches, Staff,
Expenses,Equipment's, Members Payment and Member data.

This Database helps:

-Reducing the amount of time spent managing data.

-Ability to analyse data in a variety of ways.

-improving the quality and consistency of information.

11
CHAPTER 2
DESIGN

12
Theory of ER Diagram
The E-R Diagram consists of 6 Tables namely
1)Gym
2)Staff
3)Expenses
4)Payment
5)Paying
6)Members

Gym Table Consists of Gym_id, Gname, Gaddress , Gphone , Gmanager and Built_date.
(Basically this table is for storing Branches , Location ,Phone No, Manager and Built date of
the Fitness Center)

Staff Table Consists of Staff_id, Sname , Sgender , Saddress , Sphone , Salary , Branch ,
SBdate and Gym_id
(This table gives us the staff details and which branch is the staff working in hence the
Gym_id is given a reference in this table)

Expenses Table Consists of Exp_no, Ename, Eamount, and Quantity


(This table keeps track of the Expenses the center spends on and the No of Equipments
bought)

Payment Table Consists of Payment_no, Month and Amount


(This table keeps track of the payment the members have made and what membership
package they have opted for)

Paying Table Consists of Gym_id and Exp_no


(It helps the admin to know how much expenses was used by each branch of the center)

Members Table Consists of Name, Gender , Job , Address, Phone, Email, Bdate , Startdate ,
Enddate , Member_type , Blood_group , Gym_id , Staff_id and Payment_no

13
(This table helps us keep track of Customer details like which branch the customer is
coming everyday and which trainer is handling the customer etc)
;

Gym_id, Staff_id, Exp_no,Payment_no and Email are all primary keys in tables:-

Gym

Staff

Expenses

Payment

Member

ER Diagram

14
Relational Schema Diagram

15
Activity Diagram

16
CHAPTER 3

IMPLEMENTATION

17
Creation of tables

create table Gym(


Gym_id varchar(10) primary key,
Gname varchar(50),
Gaddress varchar(150),
Gphone varchar(15),
Gmanager varchar(20),
Built_date date
);

create table Staff(


Staff_id varchar(10) primary key,
Sname varchar(20),
Sgender varchar(20),
Saddress varchar(150),
Sphone varchar(15),
Salary varchar(10),
Branch varchar(15),
SBdate date,
Gym_id varchar(10),
foreign key (Gym_id) references Gym (Gym_id)
);

create table Payment(


Payment_no varchar(10) primary key,
Month varchar(5),
Amount varchar(10));

create table Expenses(

18
Exp_no varchar(10) primary key,
Ename varchar(20),
Eamount varchar(10),
Quantity varchar(5)
);

create table Paying(


Exp_no varchar(10),
Gym_id varchar(10),
foreign key (Exp_no) references Expenses (Exp_no),
foreign key (Gym_id) references Gym (Gym_id));

create table Members(


Name varchar(20),
Gender varchar(10),
Job varchar(20),
Address varchar(150),
Phone varchar(10),
Email varchar(30) primary key,
Bdate date,
Startdate date,
Enddate date,
Member_type varchar(10),
Blood_group varchar(5),
Gym_id varchar(10),
Staff_id varchar(10),
Payment_no varchar(10),
foreign key (Gym_id) references Gym (Gym_id),
foreign key (Staff_id) references Staff (Staff_id),
foreign key (Payment_no) references Payment (Payment_no));

19
Insertion of values

insert into Gym values('6001','King Fitness Banashankari','No.617, 100 Feet Ring Road,
Next to Devegowda Petrol Bunk, Banashankari, Bengaluru – 560085','9448988906','Mr.
Santhosh','2016-01-16');

insert into Gym values('6002','King Fitness Basavanagudi','#1,Deewan N Madhava Rao road


,arumugam circle,parallel to R.V.Road, Basavanagudi, Bengaluru -
560004','9887301036','Mr. Ramesh','2012-08-24');

insert into Gym values('6003','King Fitness Basaveshwar Nagar','Veerbhadra, No. 326, 4th
Block, 3rd Stage, Basaveshwar Nagar, Bengaluru – 560079','8042350501','Mr.
Sheshadri','2012-11-12');

insert into Gym values('6004','King Fitness HSR Layout','No. 2631, 27th Main, 1st Sector,
HSR Layout, Opp. CPWD Quarters, Bengaluru – 560102','8042420606','Mr. Manoj','2014-
05-13');

insert into Gym values('6005','King Fitness Indiranagar','J K Plaza, 2nd Floor, 12th Main
Road, 788, HAL 2nd Stage, Indira Nagar, Bengaluru','7400409827','Mr. Arun','2013-08-
22');

insert into Gym values('6006','King Fitness JP Nagar','No. 67, 1st Floor, 15th Cross Road,
6th B Main Road, 3rd Phase, J P Nagar, Bengaluru – 560078','8042420404','Mr.
Jayaprakash','2011-05-13');

insert into Staff values('100','Roopesh','Male','#210 5th main 2nd cross Banashankari 2nd
Stage','9845680451','30,000','Banashankari','1992-02-23','6001');

insert into Staff values('101','Lokesh','Male','#2 10th main 6th cross Banashankari-


560084','7829667755','40,000','Banashankari','1991-01-11','6001');

insert into Staff values('102','Malini','Female','#60 4th main 5th cross Banashankari 1st
Stage','8870650112','40,000','Banashankari','1994-06-16','6001');

20
insert into Staff values('200','Rohith','Male','#41 1st main 2nd cross
Basavanagudi','7765129055','50,000','Basavanagudi','1993-05-13','6002');

insert into Staff values('201','Sanjana','Female','#30 6st main 7th cross


Srinagar','8197654001','35,000','Basavanagudi','1996-08-29','6002');

insert into Staff values('202','Nischal','Male','#16 1st main 9th cross


Hanumanagar','9981304601','45,000','Basavanagudi','1991-02-07','6002');

insert into Staff values('300','Nithin','Male','#81 3rd main 10th cross 3rd stage Basaveshwar
Nagar','9916547320','40,000','Basaveshwar','1990-11-03','6003');

insert into Staff values('301','Natasha','Female','#6 1st main 3rd cross 1st stage
Majestic','9740685431','50,000','Basaveshwar','1992-10-10','6003');

insert into Staff values('302','Nirmal','Male','#22 5th main 13th cross Rt


layout','8970556401','50,000','Basaveshwar','1994-02-14','6003');

insert into Staff values('400','Kamlesh','Male','#30 15th main 12th cross


Jayanagar','9963456001','50,000','HSR layout','1992-02-28','6004');

insert into Staff values('401','Samantha','Female','#1 5th main 3rd cross KR


road','7865400122','40,000','HSR layout','1996-07-08','6004');

insert into Staff values('402','Mark','Male','#60 4th main 4th cross


Anjanapura','9963465221','45,000','HSR layout','1991-04-10','6004');

insert into Staff values('500','Salman','Male','#24 26th main 2nd cross


Rajajinagar','9186352147','40,000','Indiranagar','1991-12-08','6005');

21
insert into Staff values('501','Rachel','Female','#11 1st main 2nd cross
Srinagar','88660450321','50,000','Indiranagar','1990-01-19','6005');

insert into Staff values('502','Shreyas','Male','#2 8th main 3rd cross


Uttarhalli','8310664041','50,000','Indiranagar','1993-05-08','6005');

insert into Staff values('600','Ananth','Male','#14 4th main 2nd cross Isro


layout','7187354312','60,000','JP Nagar','1990-01-08','6006');

insert into Staff values('601','Paula','Female','#1 8th main 14th cross


Jayanagar','9665412678','50,000','JP Nagar','1992-07-11','6006');

insert into Staff values('602','Guru','Male','#10 6th main 4th cross BTM


layout','8879459317','50,000','JP Nagar','1994-09-28','6006');

insert into Payment values('3000','Feb','7000');

insert into Payment values('3001','Jan','10000');

insert into Payment values('3002','Jan','6000');

insert into Payment values('3003','Mar','8000');

insert into Payment values('3004','Feb','8500');

insert into Payment values('3005','Jun','4500');

insert into Payment values('3006','Nov','7500');

insert into Payment values('3007','Jul','7000');

22
insert into Payment values('3008','May','6500');

insert into Payment values('3009','Feb','9000');

insert into Payment values('3010','Apr','8000');

insert into Payment values('3011','Aug','4000');

insert into Payment values('3012','Dec','3500');

insert into Payment values('3013','Oct','5000');

insert into Payment values('3014','Mar','7000');

insert into Payment values('3015','May','5500');

insert into Payment values('3016','Sep','6500');

insert into Payment values('3017','Sep','7500');

insert into Expenses values('8000','Bench Press','3000','4');

insert into Expenses values('8001','Cable and Pulleys','4000','4');

insert into Expenses values('8002','Dumbbells','8000','4');

insert into Expenses values('8003','Leg Press','5000','4');

insert into Expenses values('8004','Pull Up Bar','3500','4');

insert into Expenses values('8005','Lat Pulldown','6000','4');

23
insert into Expenses values('8006','Dipping Bars','2000','4');

insert into Paying values('8000','6001');

insert into Paying values('8001','6001');

insert into Paying values('8002','6001');

insert into Paying values('8003','6001');

insert into Paying values('8004','6001');

insert into Paying values('8005','6001');

insert into Paying values('8006','6001');

insert into Paying values('8000','6002');

insert into Paying values('8001','6002');

insert into Paying values('8002','6002');

insert into Paying values('8003','6002');

insert into Paying values('8004','6002');

insert into Paying values('8005','6002');

insert into Paying values('8006','6002');

24
insert into Paying values('8000','6003');

insert into Paying values('8001','6003');

insert into Paying values('8002','6003');

insert into Paying values('8003','6003');

insert into Paying values('8004','6003');

insert into Paying values('8005','6003');

insert into Paying values('8006','6003');

insert into Paying values('8000','6004');

insert into Paying values('8001','6004');

insert into Paying values('8002','6004');

insert into Paying values('8003','6004');

insert into Paying values('8004','6004');

insert into Paying values('8005','6004');

insert into Paying values('8006','6004');

insert into Paying values('8000','6005');

insert into Paying values('8001','6005');

25
insert into Paying values('8002','6005');

insert into Paying values('8003','6005');

insert into Paying values('8004','6005');

insert into Paying values('8005','6005');

insert into Paying values('8006','6005');

insert into Paying values('8000','6006');

insert into Paying values('8001','6006');

insert into Paying values('8002','6006');

insert into Paying values('8003','6006');

insert into Paying values('8004','6006');

insert into Paying values('8005','6006');

insert into Paying values('8006','6006');

insert into Members values('Prajwal','Male','Software Engineer','#6 1st main 1st cross


Basavanagudi','8940313129','Prajwals44@gmail.com','1997-02-05','2013-01-01','2014-01-
01','Platinum','B +ve','6002','202','3001');

insert into Members values('Pramod','Male','Doctor','#21 3rd main 4th cross


Hanumananthanagar','7865120990','Pramodrocks@gmail.com','1998-08-19','2014-05-
01','2015-05-01','Silver','A +ve','6002','200','3008');

26
insert into Members values('Bhoomika','Female','Nurse','#12 9th main 6th cross
Srinagar','9986528387','Bhoomika23297@gmail.com','1997-02-23','2016-01-01','2017-01-
01','Silver','A +ve','6002','201','3002');

insert into Members values('Renuka','Male','Sports Trainer','#22 2nd main 3rd cross


Electronic city','9956568317','Renukasp@gmail.com','1996-04-30','2013-02-01','2014-02-
01','Gold','O +ve','6003','300','3009');

insert into Members values('Vikram','Male','Musician','#41 2nd main 10th cross


Basaveshwar Nagar','8721349009','Vikramb@gmail.com','1997-06-08','2014-02-01','2015-
02-01','Silver','B +ve','6003','302','3000');

insert into Members values('Meghana','Female','Teacher','#23 2nd main 1st cross Adarsh


Nagar','7890564376','Meghanast@gmail.com','1998-11-26','2013-12-01','2014-06-
01','Normal','B -ve','6003','301','3012');

insert into Members values('Mohith','Male','Chef','#10 1st cross HSR


layout','7890554479','Mohithmr@gmail.com','1996-12-18','2014-05-01','2014-11-
01','Silver','A -ve','6004','400','3015');

insert into Members values('Sandeep','Male','Singer','#1 4th cross BTM


layout','9894554477','Sandeep112@gmail.com','1997-06-01','2014-03-01','2015-03-
01','Gold','O -ve','6004','402','3003');

insert into Members values('Mamatha','Female','Swimmer','#14 2nd main 4th cross AGS


layout','8660781230','Mamathasw@gmail.com','1996-06-11','2014-07-01','2015-07-
01','Silver','B +ve','6004','401','3007');

insert into Members values('Chandan','Male','Actor','#20 6th main Banashankari 2nd


stage','9860481630','Chandanvc@gmail.com','1996-12-30','2015-04-01','2016-04-
01','Gold','B +ve','6001','102','3010');

insert into Members values('Harsha','Male','Comedian','#18 8th main Banashankari 1st


stage','8970670890','Harshbest@gmail.com','1994-08-14','2015-10-01','2016-04-
01','Normal','A +ve','6001','100','3013');

insert into Members values('Varshitha','Female','Tailor','#21 3rd main 8th cross near Bda
complex','8950650820','Varsh12678@gmail.com','1997-02-23','2015-02-01','2016-02-
01','Gold','A +ve','6001','101','3004');

27
insert into Members values('Jacob','Male','Designer','#34 12th cross JP
nagar','7612650420','Jacobas@gmail.com','1997-11-06','2013-07-01','2014-01-
01','Normal','B -ve','6006','600','3011');

insert into Members values('Shaun','Male','Sports Master','#1 12th main 1th cross BTM
layout','9612850120','Shaunm@gmail.com','1996-05-17','2013-09-01','2014-09-01','Gold','B
+ve','6006','602','3017');

insert into Members values('Monica','Female','Wrestler','#6 4th cross near udupi


gardens','8714850124','Mons3456@gmail.com','1996-08-22','2013-06-01','2013-12-
01','Normal','O +ve','6006','601','3005');

insert into Members values('Rahul','Male','Artist','#22 2nd main 11th cross


Indiranagar','870454631','Rahulssss@gmail.com','1998-12-12','2015-09-01','2016-09-
01','Silver','B -ve','6005','502','3016');

insert into Members values('Kalpesh','Male','Athletic Master','#60 11st cross


Indiranagar','9035231324','Kalpyas1243@gmail.com','1998-03-12','2012-03-01','2013-03-
01','Silver','B +ve','6005','500','3014');

insert into Members values('Shruthi','Female','Engineer','#10 9th main


Koramangala','940474671','hruthi12456@gmail.com','1997-07-12','2012-11-01','2013-11-
01','Silver','A +ve','6005','501','3006');

28
CHAPTER 4
RESULTS AND
SNAPSHOTS

29
Select * from Tables, Queries snapshots, Front end snapshots

LOGIN FORM: (left align)

30
Put figure name and number.

HOME PAGE:

31
ANIMALS PAGE:
Figure 3.4 Animal table information

32
CLASSIFICATION PAGE:

33
STAFF PAGE:

34
TOURISTS PAGE:

35
36
37
DONATION PAGE:

38
/ Queries to be added/

39
Conclusion

we have successfully implemented ZOO MANAGEMENT DATABASE


which helps us in administrating the data used for managing the tasks
performed in a wildlife sanctuary.

View tables are used to display all the components at once so that user can see
all the components of a Particular type at once. One can just select the
component and modify and remove the component.(based on the access
control of the person)

We have successfully used various functionalities of JAVA and SQL and


created the fully functional database management system for wildlife
sanctuary.

40
Features:
1. Clean separation of various components to facilitate easy modification and
revision.
2. All the data is maintained in a separate file to facilitate easy modification
3. All the data required for different operations is kept in a separate file.
4. Quick and easy saving and loading of database file.

41
42
43
44