0% found this document useful (0 votes)
5 views22 pages

Library Management System Project Certificate

The document certifies Rajnath Prasad's completion of a Library Management System project for his Computer Science class. It details the transition from a manual library system to a computerized one using Python and MySQL, highlighting the advantages of automation such as improved efficiency and accuracy. The project includes acknowledgments, objectives, system requirements, and a description of the development process and functionalities implemented.

Uploaded by

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

Library Management System Project Certificate

The document certifies Rajnath Prasad's completion of a Library Management System project for his Computer Science class. It details the transition from a manual library system to a computerized one using Python and MySQL, highlighting the advantages of automation such as improved efficiency and accuracy. The project includes acknowledgments, objectives, system requirements, and a description of the development process and functionalities implemented.

Uploaded by

vbhvshri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Certificate

This is to certify that Rajnath Prasad,


student of Class - 12th ‘A’ has
successfully completed his Project of
Computer Science on the topic Library
Management System under the
guidance of <Teacher’s Name>.

<Teacher’s Name>
Designation
ACKNOWLEDGEMENT
I would like to express my special gratitude
to the Principal,
<Principal’s name>
for his encouragement and for all the
support that he provided for this work. I
am grateful to my teacher
<Teacher’s name>
for supporting me throughout
completion of this project.

I also extend my sincere gratitude to my


family without whom this project would
not have been possible.

<Teacher’s Name>
Designation
INDEX
S. No. Contents Page No. Teacher’s Sign

1 Manual System 1

2 Proposed System 2

Introduction of the
3 3
Project

Objectives and scope


4 4
of the Project

System
5 5
Requirements

6 Working Environment 6

Functions and
7 Modules used in this 7
Project

System Development
8 9
Life Cycle

Source Code
9 11
[Optional]

10 Output [Optional] 16

11 Conclusion 18

12 Bibliography 19
Manual System
In the manual library management system, all the records of books and
students are maintained on paper. The librarian performs all tasks manually
such as adding new books, recording issued or returned books, and
maintaining student information.
When a student wants to issue a book, the librarian must check the registers
to confirm the availability of the book. Similarly, while returning, the librarian
searches the issue register to verify the details and then manually updates
the return date.

Limitations of the Manual System

1. Time-consuming process: Every transaction (issue, return, search) takes a


lot of time since all records are checked manually.
2. Error-prone: Manual entry of data often leads to mistakes in recording or
updating records.
3. Difficult to update: Updating information like book details or student
data requires rewriting or modifying registers.
4. Data inconsistency: If multiple registers are maintained, the same data
may not always match across them.
5. Space requirement: Storing paper records needs physical space, and old
records are hard to retrieve.
6. No instant search: Finding which student has issued a particular book or
how many copies are available takes considerable time.

Example of Manual Work

Books are recorded in a Book Register with columns for Book ID, Title,
Author, and Quantity.
Student details are written in a Student Register.
Issue and return information is maintained in an Issue Register with
manual entries of dates and names.
Stock checking requires manual counting and comparison with records.

1
Proposed System
The proposed system is a computerized Library Management System
developed using Python and MySQL. It is designed to overcome the
problems faced in the manual system and to make library operations faster,
more accurate, and efficient.
This system allows the librarian to easily manage all major library activities
such as adding books, maintaining student details, issuing and returning
books, and viewing records — all from a single interface. Data is stored in a
MySQL database, ensuring that information is organized and can be retrieved
instantly whenever required.

Features of the Proposed System

1. Book Management: Allows the librarian to add, view, and update book
details easily.
2. Student Management: Maintains records of students who are registered
in the library.
3. Book Issue and Return: Automates the process of issuing and returning
books while updating the quantity in real time.
4. Data Accuracy: Reduces the chances of human error as all entries are
validated and stored systematically in the database.
5. Quick Search and Retrieval: Information about any book or student can
be fetched instantly.
6. Reduced Paperwork: All records are maintained digitally, reducing the
need for physical registers.
7. Security: Only authorized users (librarians) can make changes to the
records, ensuring data integrity.

Advantages Over Manual System

Faster and more reliable operations.


Easy to update and modify records.
Real-time availability of data.
Better organization and long-term data storage.
Saves time and effort of both librarian and students.

2
Introduction of the Project
A library is an essential part of any educational institution, where books are
issued, returned, and managed on a daily basis. Traditionally, all library
operations such as maintaining book records, issuing and returning books,
and tracking student details were handled manually using registers. This
process is time-consuming, inefficient, and prone to errors.
To overcome these limitations, a computerized Library Management System
has been developed using Python as the front-end programming language
and MySQL as the back-end database. The system automates all major
library functions, making the management process faster, simpler, and more
accurate.

This project helps in performing various operations such as:


Adding and maintaining book details
Recording student information
Issuing and returning books
Viewing issued book records and availability status

By using this system, the librarian can easily handle all library transactions
without relying on manual registers. It ensures accuracy in record-keeping,
reduces paperwork, and improves efficiency in day-to-day operations.
The project demonstrates how Python–MySQL integration can be used to
develop a simple yet powerful database-driven application, which can be
implemented in any small or medium-sized library.

3
Objectives and Scope of
the Project
Objectives

The main objective of the Library Management System is to computerize and


simplify the routine operations of a library. The project is designed to replace
the traditional manual system with a more reliable, efficient, and accurate
computerized system.
The specific objectives of the project are:
1. To develop a user-friendly application for managing library records.
2. To store and maintain all information related to books and students in a
structured database.
3. To automate the process of issuing and returning books.
4. To reduce errors and duplication in record-keeping.
5. To allow quick access and retrieval of information about books and
students.
6. To minimize paperwork and manual effort.
7. To enhance data security and ensure long-term storage of information.

Scope

The scope of this project is limited to the basic operations of a small or


medium-sized library. It can be used in schools, colleges, or institutions
where maintaining books and student records is necessary.
The system performs the following tasks:
Adding, viewing, and managing books.
Adding and managing student records.
Recording issue and return transactions automatically.
Displaying reports such as available books and issued books.
Although this project is simple in design, it demonstrates the use of database
connectivity in Python and can be further expanded to include advanced
features like fine calculation, book search filters, and user authentication.

4
System Requirements
The Library Management System has been developed using
Python and MySQL, which require certain hardware and software
configurations for smooth execution. The following are the
recommended system requirements for running this project
successfully.

Hardware Requirements

1. Processor: Intel Core i3 or higher


2. RAM: Minimum 4 GB (8 GB recommended)
3. Hard Disk: At least 200 MB of free space
4. Display: 1024 × 768 resolution or higher
5. Keyboard and Mouse: Standard input devices

Software Requirements

1. Operating System: Windows 10 or later / Linux / macOS


2. Programming Language: Python 3.8 or higher
3. Database Server: MySQL 8.0 or higher
4. Python Library: mysql-connector-python
5. IDE or Text Editor: IDLE / VS Code / PyCharm / Jupyter
Notebook
6. Command Prompt or Terminal: For running Python scripts

5
Working Environment
The Library Management System is developed in the Python
programming language with MySQL as the backend database. It
uses the mysql-connector-python library to establish a
connection between Python and MySQL, allowing smooth
execution of queries and management of records.
The program is designed to run in a text-based console
environment, making it simple and lightweight. It can be executed
on any system that supports Python and MySQL, such as
Windows, macOS, or Linux.
The software can be run using any Python IDE like IDLE, PyCharm,
or VS Code, or directly from the command line.
The database operations are performed in the MySQL
environment, which provides reliable data storage and retrieval.
Together, Python and MySQL create an efficient environment for
developing and running this project.

Environment Details:

Programming Language: Python 3.x


Database: MySQL
Database Connector: mysql-connector-python
Operating System: Windows 10 or later (compatible with
Linux/macOS)
IDE (optional): IDLE / PyCharm / Visual Studio Code
Type of Application: Console-based Application

6
Functions and Modules
Used in the Project
The Library Management System project is developed using
Python and MySQL, where various built-in functions and modules
are utilized to perform database operations, handle exceptions,
and manage user interactions effectively.
Modules Used
1. [Link]
This module is used to connect Python with the MySQL
database.
It allows the program to execute SQL queries such as
INSERT, UPDATE, DELETE, and SELECT.
Example:

import [Link]
con = [Link](host="localhost",
user="root", password="yourpassword",
database="library")
cursor = [Link]()
2. sys
Used for exiting the program safely using [Link]() when
the user chooses to quit.
3. os (optional)
Can be used to clear the console screen for better
readability (e.g., [Link]('cls') in Windows or
[Link]('clear') in Linux).

7
User-Defined Functions
The program is modularized using several functions for each
major operation.
1. add_book()
Adds a new book record into the database.
Prompts the user for book details like ID, Title, Author, and
Quantity.
2. view_books()
Displays all the books available in the library with their
details in a tabular form.
3. search_book()
Allows users to search for a specific book by its ID or title.
4. update_book()
Updates details such as book title, author name, or
quantity for an existing book record.
5. delete_book()
Deletes a book record permanently from the database.
6. create_database() / create_tables()
Checks if the required database and tables exist; if not,
creates them automatically using exception handling.
7. main_menu()
Displays the main menu options (Add, View, Search,
Update, Delete, Exit) and controls program flow based on
user choice.
Built-in Functions Used
input() – to take user input.
print() – to display messages and results.
int(), str() – for type conversion.
try–except blocks – for exception handling to avoid runtime
errors.
while True: – to keep the program running until the user
decides to exit.

8
System Development Life
Cycle (SDLC)
The Library Management System was developed following the
System Development Life Cycle (SDLC) approach. SDLC provides
a structured process to design, develop, test, and deploy software
efficiently. The major phases used in this project are explained
below:
1. Problem Identification
In this phase, the need for the system was identified. Traditional
library management using registers and manual records is time-
consuming and prone to human errors. Managing book records,
tracking issues/returns, and updating data manually is inefficient.
Hence, an automated computer-based Library Management
System was proposed to simplify and speed up these tasks.
2. Feasibility Study
The feasibility study analyzed the practicality of developing this
system.
Technical Feasibility: Python and MySQL are open-source
technologies that are easily available and compatible with
most systems.
Economic Feasibility: The system requires no additional
hardware or software cost apart from a computer with Python
and MySQL installed.
Operational Feasibility: Library staff and students can easily
learn to use the system because of its simple text-based
interface.
3. System Analysis
In this phase, the system’s requirements were analyzed. It included
understanding how data flows, what operations need to be performed (like
adding, updating, and deleting books), and how users will interact with the
system.

9
The main entities identified were Books and Library Staff/User.
Operations like Add, View, Search, Update, and Delete were
finalized for implementation.
4. System Design
Here, the database and program structure were designed.
Database Design: Tables were designed in MySQL with
appropriate fields such as Book_ID, Title, Author, and Quantity.
Program Design: The program was divided into functions for
each operation to ensure modularity and easy debugging.
The menu-driven approach was used for user interaction.
5. Coding and Implementation
The system was implemented using Python as the frontend and
MySQL as the backend.
The mysql-connector-python library was used to connect Python
with MySQL.
Each function was coded to perform a specific database
operation such as inserting, updating, or deleting data.
6. Testing
After coding, the system was tested for correctness and reliability.
Various test cases were used to check:
Addition of valid and invalid records
Searching for existing and non-existing books
Updating and deleting records
All errors and exceptions were handled properly using
Python’s try-except blocks.
7. Deployment and Maintenance
After successful testing, the system was deployed in a local
environment.
It can be maintained easily by updating the database connection
or adding new functionalities (like issue/return feature) in the
future.
As the project is modular, maintenance and expansion are simple
and efficient.

10
import [Link]
from datetime import date

# ---------- Database Connection and Setup ----------


try:
conn = [Link](
host='[Link]',
user='root',
password='bovicgille',
database='rdx ',
auth_plugin='mysql_native_password'
)
cursor = [Link]()
con = conn
# Create tables if not exist
[Link]("""
CREATE TABLE IF NOT EXISTS books (
book_id INT PRIMARY KEY,
title VARCHAR(100),
author VARCHAR(50),
price FLOAT,
quantity INT
)
""")

[Link]("""
CREATE TABLE IF NOT EXISTS students (
admn_no INT PRIMARY KEY,
name VARCHAR(50),
class VARCHAR(10),
section CHAR(1)
)
""")

[Link]("""
CREATE TABLE IF NOT EXISTS issue_records (
issue_id INT PRIMARY KEY AUTO_INCREMENT,
admn_no INT,
book_id INT,
issue_date DATE,
return_date DATE,
FOREIGN KEY (admn_no) REFERENCES students(admn_no),
FOREIGN KEY (book_id) REFERENCES books(book_id)
)
""")


[Link]()
print(" Database and tables are ready.\n")
except [Link] as err:
print(f"Database setup failed: {err}")
exit()

# ---------- Functions ----------

def add_book():
print("\n--- Add New Book ---")
try:
book_id = int(input("Enter Book ID: "))
title = input("Enter Book Title: ")
author = input("Enter Author Name: ")
price = float(input("Enter Price: "))
quantity = int(input("Enter Quantity: "))
[Link]("INSERT INTO books VALUES (%s,%s,%s,%s,%s)",
(book_id, title, author, price, quantity))
[Link]()
print("Book added successfully!\n")
except Exception as e:
print("Error:", e)

def view_books():
print("\n--- Book List ---")
[Link]("SELECT * FROM books")
data = [Link]()
if not data:
print("No books available.\n")
else:
print("BookID | Title | Author | Price | Quantity")
for row in data:
print(row)
print()

def add_student():
print("\n--- Add New Student ---")
try:
admn_no = int(input("Enter Admission Number: "))
name = input("Enter Student Name: ")
class_name = input("Enter Class: ")
section = input("Enter Section: ")
[Link]("INSERT INTO students VALUES (%s,%s,%s,%s)",
(admn_no, name, class_name, section))
[Link]()
print("Student added successfully!\n")
except Exception as e:
print("Error:", e)
def view_students():
print("\n--- Student List ---")
[Link]("SELECT * FROM students")
data = [Link]()
if not data:
print("No student records found.\n")
else:
print("AdmnNo | Name | Class | Section")
for row in data:
print(row)
print()

def issue_book():
print("\n--- Issue Book ---")
try:
admn_no = int(input("Enter Admission Number: "))
book_id = int(input("Enter Book ID: "))
issue_date = [Link]()

# Check if book exists and available


[Link]("SELECT quantity FROM books WHERE
book_id=%s", (book_id,))
book = [Link]()
if not book:
print("Book not found!\n")
return
if book[0] <= 0:
print("Book currently unavailable!\n")
return

# Insert issue record


[Link]("""
INSERT INTO issue_records (admn_no, book_id, issue_date,
return_date)
VALUES (%s, %s, %s, NULL)
""", (admn_no, book_id, issue_date))

# Reduce book quantity


[Link]("UPDATE books SET quantity = quantity - 1
WHERE book_id=%s", (book_id,))
[Link]()
print("Book issued successfully!\n")
except Exception as e:
print("Error:", e)

def return_book():
print("\n--- Return Book ---")
try:
issue_id = int(input("Enter Issue ID: "))
return_date = [Link]()

[Link]("""
SELECT book_id FROM issue_records
WHERE issue_id=%s AND return_date IS NULL
""", (issue_id,))
data = [Link]()

if not data:
print("Invalid Issue ID or already returned.\n")
return

book_id = data[0]
[Link]("UPDATE issue_records SET return_date=%s
WHERE issue_id=%s",
(return_date, issue_id))
[Link]("UPDATE books SET quantity = quantity + 1
WHERE book_id=%s", (book_id,))
[Link]()
print("Book returned successfully!\n")
except Exception as e:
print("Error:", e)

def view_issued_books():
print("\n--- Issued Books ---")
[Link]("SELECT * FROM issue_records")
data = [Link]()
if not data:
print("No issued books found.\n")
else:
print("IssueID | AdmnNo | BookID | IssueDate | ReturnDate")
for row in data:
print(row)
print()

# ---------- Main Menu ----------

def main_menu():
while True:
print("""
==================================
LIBRARY MANAGEMENT SYSTEM
==================================
1. Add Book
2. View Books
3. Add Student
4. View Students
5. Issue Book
6. Return Book
7. View Issued Books
8. Exit
""")
choice = input("Enter your choice (1-8): ")

if choice == '1':
add_book()
elif choice == '2':
view_books()
elif choice == '3':
add_student()
elif choice == '4':
view_students()
elif choice == '5':
issue_book()
elif choice == '6':
return_book()
elif choice == '7':
view_issued_books()
elif choice == '8':
print("\nThank you for using Library Management
System!")
break
else:
print("Invalid choice! Try again.\n")

# ---------- Run Program ----------


if __name__ == "__main__":
main_menu()
[Link]()
[Link]()
Output
Add New Book Add New Student

View Books View Students

Issue Book View Issued Books

16
Return Book

View Issued Books

Exit

17
Conclusion
The Library Management System project has been successfully
developed using Python and MySQL to automate the traditional
manual library management process. The system efficiently
handles all major operations such as adding new books, viewing
existing records, updating details, searching for specific books,
and deleting outdated entries.

By implementing this computerized system, the overall


management of the library becomes faster, more accurate, and
easier to maintain. It eliminates the need for manual record-
keeping, reduces errors, and ensures data consistency.

This project demonstrates how database connectivity between


Python and MySQL can be used to build real-world applications
that are both practical and user-friendly.

In the future, additional features such as book issue and return


management, student records, and graphical user interfaces
(GUIs) can be integrated to make the system even more efficient
and visually appealing.

Overall, the project achieves its objective of simplifying library


operations through automation and serves as a strong foundation
for future enhancements.

18
Bibliography
The following resources were referred to during the development
of the Library Management System project and while preparing
the project report:

1. Books:
Sumita Arora - Computer Science with Python
2. Websites:
Python Official Documentation –
[Link]
MySQL Official Documentation –
[Link]
W3Schools Python MySQL Tutorial –
[Link]
[Link]
GeeksforGeeks Python MySQL Connectivity –
[Link]
3. Others:
CBSE Class 12 Computer Science Syllabus, 2025.
Practical notes and guidelines provided by the
school/teacher.

19

You might also like