0% found this document useful (0 votes)
7 views

sakshi project

The document presents a project report on a Library Management System (LMS) developed by Mrs. Sakshi Shantaram Palaye as part of her Bachelor of Science in Computer Science. The LMS aims to enhance library operations by automating processes, improving user access, and providing robust reporting tools, thereby addressing inefficiencies in traditional library management. The report includes sections on the project's objectives, methodology, implementation details, and the anticipated impact on library services.

Uploaded by

Dhruv Borse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

sakshi project

The document presents a project report on a Library Management System (LMS) developed by Mrs. Sakshi Shantaram Palaye as part of her Bachelor of Science in Computer Science. The LMS aims to enhance library operations by automating processes, improving user access, and providing robust reporting tools, thereby addressing inefficiencies in traditional library management. The report includes sections on the project's objectives, methodology, implementation details, and the anticipated impact on library services.

Uploaded by

Dhruv Borse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 50

A PROJECT REPORT

ON
Library Management System
Submitted by

Mrs. Sakshi Shantaram Palaye


In partial fulfilment for the award of the degree
Of
BACHELOR OF SCIENCE
In
COMPUTER SCIENCE

under the guidance of

Mr. Vijay Vastava

Department OF Computer Science

K M Agrawal College Of Arts Commerce & Science

(Sem V)
(2024-2025)

1
K.M.Agrawal College of Arts, Commerce And Science

Department Of Computer Science

CERTIFICATE

This is to certify that Ms.Sakshi Shantaram Palaye of T.Y.B.Sc. (sem V)


Class seat no- has satisfactorily completed the project LIBRARY
MANAGEMENT SYSTEM is to submitted in the partial fulfilment for the award
of Bachelor of Science in Computer Science during the academic year 2024-
2025.

Head/Incharge, Department
Project Guide Computer Science

College Seal Signature of Examiner

2
DECLARATION

I, Sakshi Shantaram Palaye, hereby declare that the project entitled “Library

Management System” submitted in the partial fulfillment for the award of

Bachelor of Science in Computer Science during the academic year

2024-2025 is my original work and the project has not formed the basis for the

award of any degree, associateship, fellowship or any other similar titles.

Signature of the Student:

Place:

Date:

3
Contents

 Abstract

 Acknowledgement

1.Introduction

2.Problem Statement & Objective

3 .Motivation

4. Contribution

5. Literature Review

6. Proposed Work

7. Methodology

8. Implementation & Result

9. Conclusion

10. Reference

4
Abstract

In the digital age, efficient management of library resources is crucial for

enhancing user experience and accessibility. This paper presents a

comprehensive Library Management System (LMS) designed to streamline

operations in academic and public libraries. The system integrates key

functionalities such as cataloging, circulation, and user management, leveraging

a user-friendly interface to facilitate both staff and patron interactions.

The LMS is built on a robust database architecture, allowing for real-time

updates and extensive search capabilities. Key features include automated book

tracking, online reservation systems, and detailed reporting tools that provide

insights into resource usage and inventory management. Furthermore, the

system supports multiple user roles, ensuring secure access while promoting

collaborative usage.

By implementing this Library Management System, libraries can reduce

operational inefficiencies, enhance resource visibility, and improve overall

service delivery. The paper discusses the system's design principles,

implementation challenges, and potential impacts on library services,

highlighting its adaptability to meet the evolving needs of modern libraries.

5
Acknowledgement

We are very much indebted to our principal for their expert guidance and

cooperation. They constantly helped us, encouraged us, and inspired us to put

more effort into making this project report. They guided us from time to time

with their expert opinion and suggestions. We thank them for, without their

guidance, the successful completion of the project report would not be possible.

We would like to extend our thanks to Mr. Vijay Vastava who were open to

discussion and clarification and helped us work out many of the theoretical and

problems of the project. Finally, we would like to thank the whole staff of B.Sc

Computer Science, K.M Agrawal College for extending their helping hand to

us during our project work.

6
1.Introduction:

A Library Management System (LMS) is a software application designed


to facilitate the management of library operations. It streamlines various
functions, making it easier for librarians and users to access and manage
resources. Here’s a brief overview of its key components and
functionalities:

Key Components:

1. Cataloging

2. Circulation Management
3.User Management.
4.Search and Retrieval
5.Reporting and Analytics
6.Digital Asset Management

7
2. Problem Statement& Objectives:

In many libraries, traditional management practices often lead to inefficiencies


and challenges, including:
1. Manual Processes: Many library tasks, such as cataloging, circulation,
and user management, are still performed manually, resulting in errors
and delays.
2. Limited Access: Users may struggle to find information quickly due to
inadequate search functionalities and outdated cataloging methods.
3. Ineffective Inventory Management: Tracking inventory, including
overdue items, can be cumbersome, leading to lost materials and reduced
user satisfaction.
4. Poor Reporting Capabilities: Libraries often lack effective tools for
analyzing usage patterns, which hinders decision-making and resource
allocation.
5. User Engagement: Limited online services may result in reduced patron
engagement and missed opportunities to promote library resources.

 Objectives:
The primary objective of developing a Library Management System is to
create an integrated, user-friendly platform that enhances the efficiency of
library operations and improves the overall experience for both staff and
users. Specific objectives include:

1. Automation of Library Functions: Implement automated processes for


cataloging, circulation, and user management to minimize manual errors
and save time.
2. Enhanced Search Functionality: Develop an intuitive search interface that
allows users to easily locate resources through various filters and
categories.
3. Efficient Inventory Management: Provide tools for real-time tracking of
library materials, including overdue notifications and inventory status
updates.
4. Comprehensive Reporting and Analytics: Create reporting features that
allow librarians to analyze usage trends, monitor resource availability,
and make informed decisions.

8
5. Improved User Engagement: Facilitate online services, such as
reservations, renewals, and digital access to resources, to enhance patron
interaction with the library.

9
3.Motivation:
The motivation for implementing a Library Management System (LMS) stems
from several key factors that highlight the need for modernization and
efficiency in library operations:
1. Increasing Demand for Digital Resources: As more users seek access to
digital content, libraries must adapt to provide e-books, audiobooks, and
online databases. An LMS can effectively manage these digital assets.
2. Need for Operational Efficiency: Traditional manual processes can be
time-consuming and error-prone. Automating tasks like cataloging,
circulation, and inventory management can significantly improve
workflow and reduce the workload on staff.
3. Enhanced User Experience: Today's patrons expect quick and easy
access to information. A robust LMS improves search functionalities and
streamlines services, leading to higher user satisfaction and engagement.
4. Data-Driven Decision Making: With the growing importance of
analytics, libraries need tools to collect and analyze data on resource
usage and patron behavior. An LMS can provide valuable insights that
inform resource allocation and service improvements.
5. Resource Optimization: Efficient inventory management helps
minimize losses and ensure that resources are readily available to users.
An LMS can track materials in real time, reducing the likelihood of lost
or overdue items.
6. Support for Remote Access: As remote services become increasingly
essential, an LMS allows users to access library resources from
anywhere, facilitating a more flexible and inclusive approach to
information access.
7. Promoting Community Engagement: By offering user-friendly online
services and engaging features, libraries can better serve their
communities, promote literacy, and encourage lifelong learning.
8. Adaptation to Changing User Needs: As libraries evolve to meet the
diverse needs of their communities, an LMS can provide the flexibility to
adapt services, integrate new technologies, and enhance overall library
offerings.

10
4.Contribution:
A Library Management System (LMS) plays a crucial role in enhancing the
overall functionality and effectiveness of library operations. Here are some key
contributions:
1. Operational Efficiency:
o Automation of Tasks: Automates routine tasks such as cataloging,
check-ins, and check-outs, reducing the time staff spend on manual
processes.
2. Improved User Access:
o User-Friendly Interfaces: Provides intuitive interfaces for both staff
and users, enabling easy navigation and quick access to resources.
3. Effective Resource Management:
o Real-Time Inventory Tracking: Offers real-time tracking of library
materials, reducing the incidence of lost or overdue items.
4. Enhanced Reporting and Analytics:
o Data-Driven Insights: Generates reports on user behavior, resource
usage, and circulation statistics, enabling librarians to make informed
decisions.
5. Increased User Engagement:
o Online Services: Facilitates online functionalities such as reserving
materials, renewing loans, and accessing digital content, enhancing
user interaction with the library.

11
5.Literature Review:
The field of Library Management Systems (LMS) has evolved significantly
over the past few decades, driven by advancements in technology and changing
user needs. This literature review synthesizes key findings and themes from
recent studies and publications related to LMS.
1. Evolution of Library Management Systems
Historically, libraries relied on manual cataloging and card-based systems,
which were time-consuming and prone to error (Barker, 2015).
2. Functionality and Features
Current LMS platforms offer a range of functionalities that enhance library
3.User Experience and Engagement
Several studies emphasize the importance of user experience in LMS design.
operations.
4. Challenges in Implementation
Despite the advantages of LMS, challenges remain in their implementation.
5. Future Trends
The future of LMS is expected to be shaped by several trends

12
6.Proposed Work:
The development of a Library Management System (LMS)
aims to address the current challenges faced by libraries while
enhancing operational efficiency and user experience. Below
is an outline of the proposed work for the LMS project.

1. Project Scope and Objectives


2. System Requirements Analysis

3. System Design
4. Development and Implementation
5. Testing and Quality Assurance
6. Deployment and Training
7. Maintenance and Support

13
7.Methodology:
The methodology for developing a Library Management System (LMS)
encompasses a structured approach to ensure that the project is executed
efficiently, meets user requirements, and achieves its objectives. The following
methodology combines Agile principles with traditional software development
practices to create a robust framework for the LMS project.
1. Requirements Gathering
 Stakeholder Interviews: Conduct interviews with librarians, library
staff, and patrons to understand their needs and expectations.
2. Requirements Analysis
 Functional Requirements: Document the specific features required,
such as user registration, cataloging, circulation management, search
functionality, and reporting.
3. System Design
 Architectural Design:
o Define the system architecture (client-server, microservices, etc.) to
facilitate scalability and maintainability.
4. Development
 Agile Development:
o Implement an Agile framework (e.g., Scrum) for iterative
development, enabling regular feedback and adjustments.
5. Testing
 Testing Strategy:
o Unit Testing: Test individual components and modules to ensure
they function correctly.

6. Deployment
 Deployment Plan:
o Prepare a deployment strategy, including data migration from
existing systems if necessary.
7. Training and Documentation
14
 User Training:
o Develop training materials (guides, video tutorials) for both library
staff and patrons.
8. Maintenance and Support
 Post-Deployment Support:
o Establish a support system for addressing user inquiries and
troubleshooting issues.

15
8.Implementation & Result:
 Source Code:
Login.php:
<?php
include 'includes/session.php';

if(isset($_POST['login'])){
$student = $_POST['student'];
$sql = "SELECT * FROM students WHERE student_id = '$student'";
$query = $conn->query($sql);
if($query->num_rows > 0){
$row = $query->fetch_assoc();
$_SESSION['student'] = $row['id'];
header('location: transaction.php');
}
else{
$_SESSION['error'] = 'Student not found';
header('location: index.php');
}

}
else{
$_SESSION['error'] = 'Enter student id first';
header('location: index.php');
}

?>

16
Index.php:
<?php include 'includes/session.php'; ?>
<?php
$where = '';
if(isset($_GET['category'])){
$catid = $_GET['category'];
$where = 'WHERE category_id = '.$catid;
}
?>
<?php include 'includes/header.php'; ?>
<body class="hold-transition skin-blue layout-top-nav">
<div class="wrapper">
<?php include 'includes/navbar.php'; ?>
<div class="content-wrapper">
<div class="container">
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<?php
if(isset($_SESSION['error'])){
echo "
<div class='alert alert-danger'>
".$_SESSION['error']."
</div>
";

17
unset($_SESSION['error']);
}
?>
<div class="box">
<div class="box-header with-border">
<div class="input-group">
<input type="text" class="form-control input-lg"
id="searchBox" placeholder="Search for ISBN, Title or Author">
<span class="input-group-btn">
<button type="button" class="btn btn-primary btn-flat
btn-lg"><i class="fa fa-search"></i> </button>
</span>
</div>
</div>
<div class="box-body">
<div class="input-group col-sm-5">
<span class="input-group-addon">Category:</span>
<select class="form-control" id="catlist">
<option value=0>ALL</option>
<?php
$sql = "SELECT * FROM category";
$query = $conn->query($sql);
while($catrow = $query->fetch_assoc()){
$selected = ($catid == $catrow['id']) ? " selected" :
"";
echo "
<option value='".$catrow['id']."' ".$selected.">".
$catrow['name']."</option>
";
18
}
?>
</select>
</div>
<table class="table table-bordered table-striped"
id="booklist">
<thead>
<th>ISBN</th>
<th>Title</th>
<th>Author</th>
<th>Status</th>
</thead>
<tbody>
<?php
$sql = "SELECT * FROM books $where";
$query = $conn->query($sql);
while($row = $query->fetch_assoc()){
$status = ($row['status'] == 0) ? '<span class="label
label-success">available</span>' : '<span class="label label-danger">not
available</span>';
echo "
<tr>
<td>".$row['isbn']."</td>
<td>".$row['title']."</td>
<td>".$row['author']."</td>
<td>".$status."</td>
</tr>
";

19
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>

</div>
</div>
<?php include 'includes/footer.php'; ?>
</div>
<?php include 'includes/scripts.php'; ?>
<script>
$(function(){
$('#catlist').on('change', function(){
if($(this).val() == 0){
window.location = 'index.php';
}
else{
window.location = 'index.php?category='+$(this).val();
}

});
});

20
</script>
</body>
</html>

Logout.php:
<?php
session_start();
session_destroy();

header('location: index.php');
?>
Transaction.php:
<?php include 'includes/session.php'; ?>
<?php
if(!isset($_SESSION['student']) || trim($_SESSION['student']) == ''){
header('index.php');
}
$stuid = $student['id'];
$sql = "SELECT * FROM borrow LEFT JOIN books ON
books.id=borrow.book_id WHERE student_id = '$stuid' ORDER BY
date_borrow DESC";
$action = '';
if(isset($_GET['action'])){
$sql = "SELECT * FROM returns LEFT JOIN books ON
books.id=returns.book_id WHERE student_id = '$stuid' ORDER BY
date_return DESC";
$action = $_GET['action'];
}
?>
21
<?php include 'includes/header.php'; ?>
<body class="hold-transition skin-blue layout-top-nav">
<div class="wrapper">
<?php include 'includes/navbar.php'; ?>
<div class="content-wrapper">
<div class="container">
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">TRANSACTIONS</h3>
<div class="pull-right">
<select class="form-control input-sm" id="transelect">
<option value="borrow" <?php echo ($action == '') ?
'selected' : ''; ?>>Borrow</option>
<option value="return" <?php echo ($action == 'return') ?
'selected' : ''; ?>>Return</option>
</select>
</div>
</div>
<div class="box-body">
<table class="table table-bordered table-striped"
id="example1">
<thead>
<th class="hidden"></th>
<th>Date</th>

22
<th>ISBN</th>
<th>Title</th>
<th>Author</th>
</thead>
<tbody>
<?php
$query = $conn->query($sql);
while($row = $query->fetch_assoc()){
$date = (isset($_GET['action'])) ? 'date_return' :
'date_borrow';
echo "
<tr>
<td class='hidden'></td>
<td>".date('M d, Y',
strtotime($row[$date]))."</td>
<td>".$row['isbn']."</td>
<td>".$row['title']."</td>
<td>".$row['author']."</td>
</tr>
";
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>

23
</section>

</div>
</div>

<?php include 'includes/footer.php'; ?>


</div>

<?php include 'includes/scripts.php'; ?>


<script>
$('#transelect').on('change', function(){
var action = $(this).val();
if(action == 'borrow'){
window.location = 'transaction.php';
}
else{
window.location = 'transaction.php?action='+action;
}
});
</script>
</body>
</html>

Login_modal.php:
<!-- Login -->
<div class="modal fade" id="login">
<div class="modal-dialog">

24
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-
label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title"><b>Login</b></h4>
</div>
<div class="modal-body">
<form class="form-horizontal" method="POST" action="login.php">
<div class="form-group">
<label for="student" class="col-sm-3 control-label">Student
ID</label>

<div class="col-sm-9">
<input type="text" class="form-control" id="student"
name="student" required>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-flat pull-left" data-
dismiss="modal"><i class="fa fa-close"></i> Close</button>
<button type="submit" class="btn btn-primary btn-flat"
name="login"><i class="fa fa-sign-in"></i> Login</button>
</form>
</div>
</div>
</div>
</div>

25
Session.php:
<?php
include 'includes/conn.php';
session_start();

if(isset($_SESSION['student'])){
$sql = "SELECT * FROM students WHERE id = '".
$_SESSION['student']."'";
$query = $conn->query($sql);
$student = $query->fetch_assoc();
}

?>

Scripts.php:
<!-- jQuery 3 -->
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- DataTables -->
<script src="bower_components/datatables.net/js/jquery.dataTables.min.js"></
script>
<script
src="bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></
script>
<!-- SlimScroll -->
<script src="bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></
script>

26
<!-- FastClick -->
<script src="bower_components/fastclick/lib/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/adminlte.min.js"></script>
<!-- Data Table Initialize -->
<script>
$(function () {
$('#example1').DataTable()
var bookTable = $('#booklist').DataTable({
'paging' : true,
'lengthChange': false,
'searching' : true,
'ordering' : true,
'info' : false,
'autoWidth' : false
})

$('#searchBox').on('keyup', function(){
bookTable.search(this.value).draw();
});

})
</script>

27
Conn.php:
<?php
$conn = new mysqli('localhost', 'root', '', 'libsystem');

if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}

?>

Footer.php:
<footer class="main-footer">
<div class="container">
<div class="pull-right hidden-xs">
<b>All rights reserved</b>
</div>
<strong>Copyright &copy; 2020 <a
href="https://www.facebook.com/BermzISware">Bermz ISware
Solutions</a></strong>
</div>
<!-- /.container -->
</footer>

Header.php:
<!DOCTYPE html>
<html>

28
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Library System using PHP</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1,
user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.7 -->
<link rel="stylesheet"
href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<!-- DataTables -->
<link rel="stylesheet"
href="bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="bower_components/font-awesome/css/font-
awesome.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet" href="dist/css/skins/_all-skins.min.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and
media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script
src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->

29
<!-- Google Font -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?
family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
<style>
.dataTables_filter {
display: none;
}
</style>
</head>

Navbar.php:
<header class="main-header">
<nav class="navbar navbar-static-top">
<div class="container">
<div class="navbar-header">
<a
href="https://www.youtube.com/channel/UCsFgC9ggwrmYR2XqEHXpbNg?
view_as=subscriber" class="navbar-brand"><b>Ser</b>Bermz</a>
<button type="button" class="navbar-toggle collapsed" data-
toggle="collapse" data-target="#navbar-collapse">
<i class="fa fa-bars"></i>
</button>
</div>

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse pull-left" id="navbar-collapse">
<ul class="nav navbar-nav">
<?php
if(isset($_SESSION['student'])){
30
echo "
<li><a href='index.php'>HOME</a></li>
<li><a href='transaction.php'>TRANSACTION</a></li>
";
}
?>
</ul>
</div>
<!-- /.navbar-collapse -->
<!-- Navbar Right Menu -->
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<?php
if(isset($_SESSION['student'])){
$photo = (!empty($student['photo'])) ? 'images/'.$student['photo'] :
'images/profile.jpg';
echo "
<li class='user user-menu'>
<a href='#'>
<img src='".$photo."' class='user-image' alt='User Image'>
<span class='hidden-xs'>".$student['firstname'].' '.
$student['lastname']."</span>
</a>
</li>
<li><a href='logout.php'><i class='fa fa-sign-out'></i>
LOGOUT</a></li>
";
}

31
else{
echo "
<li><a href='#login' data-toggle='modal'><i class='fa fa-sign-in'></i>
LOGIN</a></li>
";
}
?>
</ul>
</div>
<!-- /.navbar-custom-menu -->
</div>
<!-- /.container-fluid -->
</nav>
</header>
<?php include 'includes/login_modal.php'; ?>

Libsystem.sql:
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 19, 2020 at 07:13 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.30

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


START TRANSACTION;

32
SET time_zone = "+00:00";

/*!40101 SET
@OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET
@OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS
*/;
/*!40101 SET
@OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION
*/;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `libsystem`
--

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

--
-- Table structure for table `admin`
--

CREATE TABLE `admin` (


`id` int(11) NOT NULL,
`username` varchar(30) NOT NULL,
`password` varchar(60) NOT NULL,
`firstname` varchar(30) NOT NULL,
`lastname` varchar(30) NOT NULL,
`photo` varchar(200) NOT NULL,

33
`created_on` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

INSERT INTO `admin` (`id`, `username`, `password`, `firstname`, `lastname`,


`photo`, `created_on`) VALUES
(1, 'serbermz',
'$2y$10$1VmOehdw8EfSiTn.wRR2EOmRviX23G6G/8KrbTRkAatc4dRTBLB
2q', 'Lyndon', 'Bermoy', 'profile_youtube.jpg', '2018-05-03');

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

--
-- Table structure for table `books`
--

CREATE TABLE `books` (


`id` int(11) NOT NULL,
`isbn` varchar(20) NOT NULL,
`category_id` int(11) NOT NULL,
`title` text NOT NULL,
`author` varchar(150) NOT NULL,
`publisher` varchar(150) NOT NULL,
`publish_date` date NOT NULL,
`status` int(1) NOT NULL

34
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `books`
--

INSERT INTO `books` (`id`, `isbn`, `category_id`, `title`, `author`, `publisher`,


`publish_date`, `status`) VALUES
(2, 'bookisbntest', 2, 'Calculus Made Easy', 'Author Me', 'Self Publish Inc',
'2018-05-02', 0),
(13, '159420229X', 3, 'Moonwalking with Einstein: The Art and Science of
Remembering Everything ', 'Joshua Foer ', 'Penguin Press HC', '2020-05-11', 0);

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

--
-- Table structure for table `borrow`
--

CREATE TABLE `borrow` (


`id` int(11) NOT NULL,
`student_id` int(11) NOT NULL,
`book_id` int(11) NOT NULL,
`date_borrow` date NOT NULL,
`status` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

35
--
-- Table structure for table `category`
--

CREATE TABLE `category` (


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

--
-- Dumping data for table `category`
--

INSERT INTO `category` (`id`, `name`) VALUES


(1, 'Engineering'),
(2, 'Mathematics'),
(3, 'Science and Technology'),
(4, 'History');

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

--
-- Table structure for table `course`
--

CREATE TABLE `course` (

36
`id` int(11) NOT NULL,
`title` text NOT NULL,
`code` varchar(15) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `course`
--

INSERT INTO `course` (`id`, `title`, `code`) VALUES


(1, 'Bachelor of Science in Information Systems', 'BSIS'),
(2, 'Bachelor of Science in Computer Science', 'BSCS');

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

--
-- Table structure for table `returns`
--

CREATE TABLE `returns` (


`id` int(11) NOT NULL,
`student_id` int(11) NOT NULL,
`book_id` int(11) NOT NULL,
`date_return` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

37
--
-- Table structure for table `students`
--

CREATE TABLE `students` (


`id` int(11) NOT NULL,
`student_id` varchar(15) NOT NULL,
`firstname` varchar(50) NOT NULL,
`lastname` varchar(50) NOT NULL,
`photo` varchar(200) NOT NULL,
`course_id` int(11) NOT NULL,
`created_on` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `books`

38
--
ALTER TABLE `books`
ADD PRIMARY KEY (`id`);

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

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

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `books`
--
ALTER TABLE `books`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `borrow`
--

40
ALTER TABLE `borrow`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `category`
--
ALTER TABLE `category`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `course`
--
ALTER TABLE `course`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `returns`
--
ALTER TABLE `returns`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `students`
--
ALTER TABLE `students`
41
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT=5;
COMMIT;

/*!40101 SET
CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET
CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET
COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Book_add.php:
<?php
include 'includes/session.php';
if(isset($_POST['add'])){
$isbn = $_POST['isbn'];
$title = $_POST['title'];
$category = $_POST['category'];
$author = $_POST['author'];
$publisher = $_POST['publisher'];
$pub_date = $_POST['pub_date'];
$sql = "INSERT INTO books (isbn, category_id, title, author, publisher,
publish_date) VALUES ('$isbn', '$category', '$title', '$author', '$publisher',
'$pub_date')";

42
if($conn->query($sql)){
$_SESSION['success'] = 'Book added successfully';
}
else{
$_SESSION['error'] = $conn->error;
}
}
else{
$_SESSION['error'] = 'Fill up add form first';
}
header('location: book.php');
?>

Book_delete.php:
<?php
include 'includes/session.php';

if(isset($_POST['delete'])){
$id = $_POST['id'];
$sql = "DELETE FROM books WHERE id = '$id'";
if($conn->query($sql)){
$_SESSION['success'] = 'Book deleted successfully';
}
else{
$_SESSION['error'] = $conn->error;

43
}
}
else{
$_SESSION['error'] = 'Select item to delete first';
}

header('location: book.php');

?>

44
Result:

45
46
47
48
9.Conclusion:
A library management system plays a crucial role in
enhancing the efficiency and effectiveness of library
operations. By automating various tasks such as cataloging,
circulation, and inventory management, these systems
streamline workflows, reduce manual errors, and improve
user experience. They enable better data management and
reporting, facilitating informed decision-making for library
staff. Additionally, by providing easy access to resources and
information, a library management system fosters greater
engagement among patrons and supports the overall mission
of promoting knowledge and lifelong learning. As technology
continues to evolve, the integration of advanced features such
as mobile access, online catalogs, and data analytics will

49
further enrich the library experience, ensuring that libraries
remain vital centers of community and education in the digital
age.

10.Reference:
 Google
 Youtube

50

You might also like