Dbms Mini Project Report
Dbms Mini Project Report
Submitted by
SIBIAH R(953623205050)
BACHELOR OF TECHNOLOGY
DEPARTMENT OF INFORMATION
TECHNOLOGY RAJAPALAYAM-626
108
Certified that this Report titled “LIBRARY MANAGEMENT SYSTEM” is the bonafide
work of Sibiah R(953623205050),Sobika Joleen G J(953623205051) who carried out the
work under my supervision. Certified further that to the best of my knowledge the work
reported herein does not form part of any other thesis or dissertation on the basis of which a
degree or award was conferred on an earlier occasion on this or any other candidate.
SIGNATURE SIGNATURE
Mrs. A. Alagulakshmi Dr. V. Anusuya
SUPERVISOR HEAD OF THE DEPARTMENT
Assistant Professor, Associate Professor,
Department of Information Technology, Department of Information
Technology, Ramco Institute of Technology Ramco Institute of Technology
Rajapalayam-626 112. Rajapalayam-626 117.
DECLARATION
We hereby declare that the project work entitled “Library Management System ” has
been submitted by me, Sibiah R(953623205050),Sobika Joleen G J(953623205051) in
the partial fulfilment of the requirement for the award of the degree of Bachelor of
Technology – Information Technology. We further declare that the contents, statements
and other relevant matters are true to the best of our knowledge.
ACKNOWLEDGEMENT
First and foremost, I express my utmost gratitude to our Chairman, Shri. P.R.
Venketrama Raja, B.E., MBA., for his remarkable support and encouragement toward
the improvement of the college.
I am also indebted to Dr. V. Anusuya, M.E., Ph.D., Associate Professor and Head,
Department of Information Technology, for providing the necessary lab facilities to
complete my work.
I am very much thankful to all the staff members of the Department of Information
Technology for the various ways in which they supported me during the completion of my
project.
Last but not least, I extend my sincere thanks to my friends and family members for
their unwavering support and encouragement throughout my project journey.
Signature
ABSTRACT
In today’s digital world, managing library operations efficiently is more important than
ever. Libraries deal with a wide range of tasks including book cataloging, issuing and
returning of books, member management, and keeping track of inventory. Traditional
manual methods can be time-consuming, prone to errors, and difficult to scale as the
number of books and users grows.
1
likelihood of errors, and enhances the overall experience for both staff and users.
2
2. SYSTEM REQUIREMENTS
Hardware Requirements
Component Specification
RAM 4 GB minimum
3
Software Requirements
Software Description
2.2.1 INTRODUCTION
4
Track issued book history
Display author and admin details
Generate basic reports (issued books, overdue list)
5
3. IMPLEMENTATION
Students (tblStudents)
id (Primary Key)
StudentId
FullName
EmailId
MobileNumber
Password
Status
RegDate
IssuedBooks (tblIssuedBookDetails)
id (Primary Key)
BookId (Foreign Key)
StudentID (Foreign Key)
IssuesDate
ReturnDate
ReturnStatus
Fine
7
3.2) ER DIAGRAM :
3.3) QUERY
1. SET
Definition:
Sets system or session-level variables or modes.
Syntax:
SET variable_name = value;
8
START TRANSACTION;
-- SQL commands here
COMMIT;
3. CREATE TABLE
Definition:
Creates a new table in the database with specified columns and data types.
Syntax:
CREATE TABLE table_name
( column1 datatype [constraints],
column2 datatype [constraints],
...
);
4. INSERT INTO
Definition:
Adds new records into a table.
Syntax:
INSERT INTO table_name (column1, column2, ...) VALUES (value1, value2, ...);
5. ALTER TABLE
Definition:
Modifies an existing table (e.g., add indexes, change columns, add constraints).
Syntax:
ALTER TABLE table_name ADD CONSTRAINT;
ALTER TABLE table_name MODIFY column_name datatype [constraint];
6. AUTO_INCREMENT
Definition:
Used to automatically increment the value of a column (usually the primary key).
Syntax:
column_name datatype AUTO_INCREMENT
9
7. PRIMARY KEY / UNIQUE KEY
Definition:
PRIMARY KEY: Uniquely identifies each record.
UNIQUE KEY: Ensures all values in a column are
unique. Syntax:
ALTER TABLE table_name ADD PRIMARY KEY
(column_name); ALTER TABLE table_name ADD UNIQUE
(column_name);
8. ENGINE=InnoDB, DEFAULT CHARSET=latin1
Definition:
Table options specifying the storage engine (InnoDB) and default character set (latin1).
Syntax:
Used within CREATE TABLE:
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
9. ON UPDATE CURRENT_TIMESTAMP / DEFAULT CURRENT_TIMESTAMP
Definition:
Automatically sets or updates a TIMESTAMP column when a record is inserted or
updated.
Syntax:
column_name TIMESTAMP DEFAULT CURRENT_TIMESTAMP
column_name TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
10. COMMENTED QUERIES (using -- or /* */)
Definition:
Comments are used to annotate the SQL code and are not executed.
Syntax:
-- Single-line comment
/* Multi-line
comment */
11. Special MySQL Comments for Version Control
10
Definition:
Special comments that only execute if the server version is higher than the specified
version.
Syntax:
/*!version_number SQL_statement */;
3.4 CODE:
1) Admin login:
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if ($_SESSION['alogin'] != '') {
$_SESSION['alogin'] = '';
}
if (isset($_POST['login'])) {
$username = $_POST['username'];
$password = md5($_POST['password']);
$results = $query->fetchAll(PDO::FETCH_OBJ); if
($query->rowCount() > 0) {
$_SESSION['alogin'] = $_POST['username'];
echo "<script type='text/javascript'> document.location ='admin/dashboard.php'; </script>";
} else {
echo "<script>alert('Invalid Details');</script>";
}
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="description" content="Admin Login" />
<meta name="author" content="Library System" />
11
<title>Online Library Management System | Admin Login</title>
<!-- BOOTSTRAP CORE STYLE -->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FONT AWESOME STYLE -->
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<!-- CUSTOM STYLE -->
<link href="assets/css/style.css" rel="stylesheet" />
<!-- GOOGLE FONT -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
</head>
<body>
<!-- MENU SECTION START -->
<?php include('includes/header.php'); ?>
<!-- MENU SECTION END -->
<div class="content-wrapper">
<div class="container">
<div class="row pad-botm">
<div class="col-md-12">
<h4 class="header-line">ADMIN LOGIN FORM</h4>
</div>
</div>
</div>
</div>
12
<!-- FOOTER SECTION -->
<?php include('includes/footer.php'); ?>
<!-- FOOTER SECTION END -->
2) User login:
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if ($_SESSION['login'] != '') {
$_SESSION['login'] = '';
}
if (isset($_POST['login'])) {
$email = $_POST['emailid'];
$password = md5($_POST['password']);
if ($query->rowCount() > 0)
{ foreach ($results as $result) {
$_SESSION['stdid'] = $result->StudentId;
if ($result->Status == 1) {
$_SESSION['login'] = $_POST['emailid'];
echo "<script type='text/javascript'> document.location ='dashboard.php'; </script>";
} else {
echo "<script>alert('Your Account Has been blocked. Please contact admin');</script>";
}
}
} else {
echo "<script>alert('Invalid Details');</script>";
}
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
13
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Online Library Management System | User Login</title>
<!-- BOOTSTRAP CORE STYLE -->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FONT AWESOME STYLE -->
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<!-- CUSTOM STYLE -->
<link href="assets/css/style.css" rel="stylesheet" />
<!-- GOOGLE FONT -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
</head>
<body>
<!-- MENU SECTION START -->
<?php include('includes/header.php'); ?>
<!-- MENU SECTION END -->
<div class="content-wrapper">
<div class="container">
<div class="row pad-botm">
<div class="col-md-12">
<h4 class="header-line">USER LOGIN FORM</h4>
</div>
</div>
3) Sign-up page:
<?php
session_start();
include('includes/config.php');
error_reporting(0);
if(isset($_POST['signup'])) {
//Code for student ID
$count_my_page = ("studentid.txt");
$hits = file($count_my_page);
$hits[0]++;
$fp = fopen($count_my_page, "w");
fputs($fp, "$hits[0]");
fclose($fp);
$StudentId = $hits[0];
$fname = $_POST['fullanme'];
$mobileno = $_POST['mobileno'];
$email = $_POST['email'];
$password = md5($_POST['password']);
$status = 1;
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<title>Online Library Management System | Student Signup</title>
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<link href="assets/css/style.css" rel="stylesheet" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
<script type="text/javascript">
function valid() {
if(document.signup.password.value != document.signup.confirmpassword.value)
{ alert("Password and Confirm Password do not match!");
document.signup.confirmpassword.focus();
return false;
}
return true;
}
</script>
<script>
function checkAvailability() {
$("#loaderIcon").show();
jQuery.ajax({
url: "check_availability.php",
data:'emailid='+$("#emailid").val(),
type: "POST", success:function(data)
{
$("#user-availability-status").html(data);
$("#loaderIcon").hide();
},
error:function (){}
});
}
</script>
</head>
<body>
<?php include('includes/header.php');?>
16
<div class="content-wrapper">
<div class="container">
<div class="row pad-botm">
<div class="col-md-12">
<h4 class="header-line">User Signup</h4>
</div>
</div>
<div class="row">
<div class="col-md-9 col-md-offset-1">
<div class="panel panel-danger">
<div class="panel-heading">
SIGNUP FORM
</div>
<div class="panel-body">
<form name="signup" method="post" onSubmit="return valid();">
<div class="form-group">
<label>Enter Full Name</label>
<input class="form-control" type="text" name="fullanme" autocomplete="off" required
/>
</div>
<div class="form-group">
<label>Mobile Number :</label>
<input class="form-control" type="text" name="mobileno" maxlength="10"
autocomplete="off" required />
</div>
<div class="form-group">
<label>Enter Email</label>
<input class="form-control" type="email" name="email" id="emailid"
onBlur="checkAvailability()" autocomplete="off" required />
<span id="user-availability-status" style="font-size:12px;"></span>
</div>
<div class="form-group">
<label>Enter Password</label>
<input class="form-control" type="password" name="password" autocomplete="off"
required /
> </div>
<div class="form-group">
<label>Confirm Password </label>
<input class="form-control" type="password" name="confirmpassword"
autocomplete="off" required />
</div>
<?php include('includes/footer.php');?>
<script src="assets/js/jquery-1.10.2.js"></script>
<script src="assets/js/bootstrap.js"></script>
<script src="assets/js/custom.js"></script>
</body>
</html>
4) Dashboard:
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['login'])==0)
{
header('location:index.php');
}
else{?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Online Library Management System | User Dash Board</title>
<!-- BOOTSTRAP CORE STYLE -->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FONT AWESOME STYLE -->
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<!-- CUSTOM STYLE -->
<link href="assets/css/style.css" rel="stylesheet" />
<!-- GOOGLE FONT -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
</head>
<body>
<!------MENU SECTION START-->
<?php include('includes/header.php');?>
<!-- MENU SECTION END-->
<div class="content-wrapper">
18
<div class="container">
<div class="row pad-botm">
<div class="col-md-12">
<h4 class="header-line">USER DASHBOARD</h4>
</div>
</div>
<div class="row">
19
<h3><?php echo htmlentities($returnedbooks);?></h3>
Books Not Returned Yet
</div>
</div>
</div>
</div>
</div>
<!-- CONTENT-WRAPPER SECTION END-->
<?php include('includes/footer.php');?>
<!-- FOOTER SECTION END-->
<!-- JAVASCRIPT FILES PLACED AT THE BOTTOM TO REDUCE THE LOADING TIME -->
<!-- CORE JQUERY -->
<script src="assets/js/jquery-1.10.2.js"></script>
<!-- BOOTSTRAP SCRIPTS -->
<script src="assets/js/bootstrap.js"></script>
<!-- CUSTOM SCRIPTS -->
<script src="assets/js/custom.js"></script>
</body>
</html>
<?php } ?>
20
4. EXPERIMENTAL RESULTS
The Library Management System was tested extensively to ensure smooth functionality
across all modules. Admin users were able to log in securely and manage book records,
categories, and student information without any errors. The system successfully handled
the addition and deletion of books, issuing and returning operations, and automatic fine
calculations for overdue books. Students were able to register, search for available books,
and view their borrowing history through a responsive user interface. Each feature was
tested under various scenarios, such as empty form submissions, invalid data inputs, and
concurrent operations. The system consistently returned accurate outputs and maintained
data integrity. The overall performance was fast, with page loading times averaging under
two seconds. Data retrieval and update operations were efficiently handled by the MySQL
database, validating the robustness of the backend.
21
22
23
User Login
24
25
Tables
Category
26
Students
Author
Admin
27
Books
28
5. CONCLUSION
The Library Management System provides a reliable and efficient solution for managing
day-to-day library operations digitally. By replacing traditional manual methods, the
system improves accuracy, reduces time consumption, and minimizes human errors. It
allows administrators to maintain a well-organized book catalog, track issued and returned
books, and manage student memberships with ease. The web-based interface is simple and
user- friendly, making it accessible to all users with basic computing knowledge. Designed
with scalability in mind, the system can be enhanced with additional features such as SMS
alerts, email notifications, and cloud deployment. Overall, this project achieves its
objective of streamlining library management processes and providing a better user
experience for both staff and students.
29
6. REFERENCES
30