Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 19

DATABASE MANAGEMENT

SYSTEM
Project File
Gym Membership System
By-

Hrithik Sinha 23SCSE1110016


Aniket Sharma 23SCSE1460012
AMANULLAH 23SCSE1110022
Nikit Kumar Dev 23SCSE1110002

Bachelor of computer application .. Section -18


Submitted to Mr. Akhilesh Kumar Singh
Index
 Title page
 Project introduction
 Project Objective
 Literature Overview
 ER Diagram
 Code Snippet

 Structure of login page


 Structure of Table
 Conclusion
 Bibliography & References

Project Introduction
Database management system project on a webpage designed
to manage and organize the daily operations of a gym. The
system provides a standalone webpage with a Graphical User
Interface (GUI) that can connect to relational databases,
allowing for client/server use.

The system utilizes the features of a database server, which


supports large databases, multiple concurrent users, and
ensures data security. The gym management system project
aims to provide an efficient and automated way to manage
gym memberships, track workout schedules, and monitor
equipment maintenance, among other tasks.

The system's advantages include:


1) Easy membership management
2) Efficient scheduling of workout sessions
3) Automated tracking of equipment maintenance
4) Enhanced data security
5) Scalability to accommodate a large number of users

Project objective
The primary project objective of gym membership
management system in DBMS is to provide an efficient and
automated way to manage gym memberships, billing, and
other related activities. The system aims to streamline the
administrative tasks involved in managing a gym, making it
easier for gym owners and managers to focus on providing
high-quality services to their members.
The specific project objectives of a gym membership
management system in DBMS include:

 Designing and implementing a database schema to


store gym membership information, including member
details, membership types, and billing information.
 Developing a user-friendly interface for gym members
to manage their accounts, including viewing their
membership status, payment history, and workout
schedules.
 Implementing a billing system that automates the
process of generating invoices, collecting payments,
and tracking delinquent accounts.
 Providing gym managers with tools to manage
memberships, including adding new members,
renewing existing memberships, and terminating
memberships.
 Implementing a reporting system that provides gym
owners and managers with insights into membership
trends, revenue streams, and other key performance
indicators.
 Ensuring data security and privacy by implementing
appropriate access controls and encryption
mechanisms.
Literature overview
The gym management system in DBMS is a well-researched
area with many studies and papers published. Researchers
have focused on various aspects of gym management systems,
including membership management, billing, scheduling, and
equipment maintenance.
One study proposes a Smart Gym Management System that
automates the process of managing gym memberships, billing,
and scheduling. The system integrates facial recognition
technology for user authentication and webcam integration for
online classes. The system also uses Twilio SMS API for
phone number verification, making it more secure and user-
friendly.
Another paper emphasizes the importance of data security and
privacy in gym management systems. The authors propose a
system that implements appropriate access controls and
encryption mechanisms to ensure the confidentiality and
integrity of gym members' data.
Other studies have focused on the use of DBMS to manage
gym equipment maintenance, scheduling, and reporting.
These systems provide gym owners and managers with
insights into membership trends, revenue streams, and other
key performance indicators.

ER Diagram
Code snippet
-- Table structure for table `admin`
--

CREATE TABLE `admin` (


`user_id` int(11) NOT NULL,
`username` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
`name` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `admin`
--

INSERT INTO `admin` (`user_id`, `username`, `password`, `name`) VALUES


(2, 'admin', 'f2d0ff370380124029c2b807a924156c', 'admin');

-- --------------------------------------------------------

--
-- Table structure for table `announcements`
--

CREATE TABLE `announcements` (


`id` int(11) NOT NULL,
`message` varchar(100) NOT NULL,
`date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `announcements`
--

INSERT INTO `announcements` (`id`, `message`, `date`) VALUES


(7, 'This is to announce that our GYM will remain close for 51 days due to COVID-19.', '2020-
03-30'),
(8, 'Opening of GYM Halls and Clubs are not fixed yet. Stay tuned for more updates!!', '2020-
04-03'),
(9, 'Renovation Going On...', '2020-04-04'),
(10, 'This is a demo announcement from admin', '2022-06-03');

-- --------------------------------------------------------

--
-- Table structure for table `attendance`
--

CREATE TABLE `attendance` (


`id` int(11) NOT NULL,
`user_id` varchar(100) NOT NULL,
`curr_date` text NOT NULL,
`curr_time` text NOT NULL,
`present` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `equipment`
--

CREATE TABLE `equipment` (


`id` int(11) NOT NULL,
`name` varchar(30) NOT NULL,
`amount` int(100) NOT NULL,
`quantity` int(100) NOT NULL,
`vendor` varchar(50) NOT NULL,
`description` varchar(50) NOT NULL,
`address` varchar(20) NOT NULL,
`contact` varchar(10) NOT NULL,
`date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--

-- --------------------------------------------------------

--
-- Table structure for table `rates`
--
CREATE TABLE `rates` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`charge` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--

--
-- Table structure for table `reminder`
--
CREATE TABLE `reminder` (
`id` int(50) NOT NULL,
`name` varchar(50) NOT NULL,
`message` text NOT NULL,
`status` text NOT NULL,
`date` datetime NOT NULL,
`user_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--

--
-- Table structure for table `staffs`
--

CREATE TABLE `staffs` (


`user_id` int(11) NOT NULL,
`username` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
`fullname` varchar(50) NOT NULL,
`address` varchar(20) NOT NULL,
`designation` varchar(20) NOT NULL,
`gender` varchar(10) NOT NULL,
`contact` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
--
-- Table structure for table `todo`
--

CREATE TABLE `todo` (


`id` int(11) NOT NULL,
`task_status` varchar(50) NOT NULL,
`task_desc` varchar(30) NOT NULL,
`user_id` int(7) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
--
-- Indexes for dumped tables
--

--
-- Indexes for table `admin`
--
ALTER TABLE `admin`
ADD PRIMARY KEY (`user_id`);

--
-- Indexes for table `announcements`
--
ALTER TABLE `announcements`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `attendance`
--
ALTER TABLE `attendance`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `equipment`
--
ALTER TABLE `equipment`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `members`
--
ALTER TABLE `members`
ADD PRIMARY KEY (`user_id`);

--
-- Indexes for table `rates`
--
ALTER TABLE `rates`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `reminder`
--
ALTER TABLE `reminder`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `staffs`
--
ALTER TABLE `staffs`
ADD PRIMARY KEY (`user_id`);

--
-- Indexes for table `todo`
--
ALTER TABLE `todo`
ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `announcements`
--
ALTER TABLE `announcements`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `attendance`
--
ALTER TABLE `attendance`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT for table `equipment`
--
ALTER TABLE `equipment`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `members`
--
ALTER TABLE `members`
MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;
--
-- AUTO_INCREMENT for table `rates`
--
ALTER TABLE `rates`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `reminder`
--
ALTER TABLE `reminder`
MODIFY `id` int(50) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
--
-- AUTO_INCREMENT for table `staffs`
--
ALTER TABLE `staffs`
MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `todo`
--

Login page code


<?php session_start();
include('dbcon.php'); ?>
<!DOCTYPE html>
<html lang="en">

<head>
<title>Gym System Admin</title><meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="css/matrix-style.css" />
<link rel="stylesheet" href="css/matrix-login.css" />
<link href="font-awesome/css/fontawesome.css" rel="stylesheet" />
<link href="font-awesome/css/all.css" rel="stylesheet" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,800' rel='stylesheet'
type='text/css'>

</head>

<body>

<div id="loginbox">
<form id="loginform" method="POST" class="form-vertical" action="#">
<div class="control-group normal_text"> <h3><img src="img/icontest3.png" alt="Logo"
/></h3></div>
<div class="control-group">
<div class="controls">
<div class="main_input_box">
<span class="add-on bg_lg"><i class="fas fa-user-circle"></i></span><input
type="text" name="user" placeholder="Username" required/>
</div>
</div>
</div>
<div class="control-group">
<div class="controls">
<div class="main_input_box">
<span class="add-on bg_ly"><i class="fas fa-lock"></i></span><input
type="password" name="pass" placeholder="Password" required />
</div>
</div>
</div>
<div class="form-actions center">
<!-- <span class="pull-right"><a type="submit" href="index.html" class="btn btn-
success" /> Login</a></span> -->
<!-- <input type="submit" class="button" title="Log In" name="login" value="Admin
Login"></input> -->
<button type="submit" class="btn btn-block btn-large btn-info" title="Log In"
name="login" value="Admin Login">Admin Login</button>
</div>
</form>
<?php
if (isset($_POST['login']))
{
$username = mysqli_real_escape_string($con, $_POST['user']);
$password = mysqli_real_escape_string($con, $_POST['pass']);

$password = md5($password);

$query = mysqli_query($con, "SELECT * FROM admin WHERE


password='$password' and username='$username'");
$row = mysqli_fetch_array($query);
$num_row = mysqli_num_rows($query);

if ($num_row > 0)
{
$_SESSION['user_id']=$row['user_id'];
header('location:admin/index.php');

}
else
{
echo "<div class='alert alert-danger alert-dismissible' role='alert'>
Invalid Username and Password
<button type='button' class='close' data-dismiss='alert' aria-label='Close'>
<span aria-hidden='true'>&times;</span>
</button>
</div>";
}
}
?>
<div class="pull-left">
<a href="customer/index.php"><h6>Customer Login</h6></a>
</div>

<div class="pull-right">
<a href="staff/index.php"><h6>Staff Login</h6></a>
</div>

</div>
<script src="js/jquery.min.js"></script>
<script src="js/matrix.login.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/matrix.js"></script>
</body>

</html>

Structure of Login page


Structure of tables
Conclusion
Overall, the literature on gym management systems in DBMS
highlights the importance of automation, accuracy, user-
friendly interfaces, information availability, communication
capacity, maintenance, and cost reduction. These systems
provide gym owners and managers with efficient and effective
tools to manage their businesses, ultimately improving the
overall member experience and driving business growth.

Bibliography & References

Research and introduction


Websites: https://www.geeksforgeeks.org/
Codes: https://www.w3schools.com/sql/
Frontend codes: https://www.youtube.com/
SQL: https://www.bdrsuite.com/blog/system-databases-
sql-server/

Books References:
Head First Python: A Brain-Friendly Guide
Programming Python: Powerful Object-Oriented
Programming
The Pragmatic Programmer

You might also like