KEMBAR78
Project Lms SQL | PDF | Libraries | Information Science
0% found this document useful (0 votes)
38 views20 pages

Project Lms SQL

The document presents a project report on a Library Management System developed by students as part of their Computer Science curriculum for the academic year 2025-2026. It outlines the project's objectives, software used, and features, emphasizing the system's role in automating library operations to improve efficiency and reduce errors. The report includes source code, output examples, and a bibliography for reference.

Uploaded by

Pradeepkhanth B
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)
38 views20 pages

Project Lms SQL

The document presents a project report on a Library Management System developed by students as part of their Computer Science curriculum for the academic year 2025-2026. It outlines the project's objectives, software used, and features, emphasizing the system's role in automating library operations to improve efficiency and reduce errors. The report includes source code, output examples, and a bibliography for reference.

Uploaded by

Pradeepkhanth B
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
You are on page 1/ 20

Computer Science Project

LIBRARY MANAGEMENT SYSTEM

A PROJECT REPORT SUBMITTED


IN A PARTIAL FULFILLMENT OF THE REQUIREMENTS
2025-26

IN
COMPUTER SCIENCE
P Priasagi , Nethraa Dhevi , Preethi

Grade : XII
1
BONAFIDE CERTIFICATE
SUNBEAM CBSE SCHOOL

This is to certify that I am


studying in class in

For the Academic year 2025-2026, the student


successfully completed his / her Computer Science
Project and submitted the report for the AISSCE
BOARD practical Examination held on.

External Examiner Principal

Internal Examiner
2
TABLE OF CONTENTS

SER DESCRIPTION PAGE NO

01 ACKNOWLEDGEMENT 04

02 INTRODUCTION 05

03 OBJECTIVES OF THE PROJECT 05

04 SOFTWARE USED

05 SOURCE CODE 09

06 OUTPUT 16

07 BIBLIOGRAPHY 20

3
ACKNOWLEDGEMENT

I would like to express my heartfelt gratitude to all those who


have contributed to the successful completion of this project. First
and foremost, I am deeply thankful to my teacher, [Teacher’s Name],
for their invaluable guidance, encouragement, and support throughout
this project. Their expertise and constructive feedback have been
instrumental in shaping my understanding and enhancing the quality
of my work.
I am also grateful to our school principal, [Principal’s Name],
for providing the necessary resources and facilities that enabled me to
undertake this project. Their leadership and support have been crucial
to my academic journey. Additionally, I would like to acknowledge
the assistance of my classmates and friends, whose collaboration and
insights enriched the project. Their support and encouragement were
invaluable during this endeavor.
Lastly, I extend my sincere thanks to my family for their
unwavering support and understanding. Their constant motivation and
belief in my abilities have been a source of strength throughout this
project.
Thank you all for your contributions and support.

4
OBJECTIVES OF THE PROJECT

The objective of the Library Management System project is to design and


develop a digital system that simplifies and automates the core library operations,
such as book management, student registration, book issuance, and return tracking.
This system aims to replace traditional manual methods, reduce human error, and
provide a reliable, user-friendly interface for librarians and students. By using a
database-backed application, it ensures data integrity, quick access to records, and
efficient handling of library transactions.

Software and system specification used

1 Python IDEL
2 Window 10

5
Introduction to Library Management System
1. Overview
In the digital age, traditional methods of managing library operations
have become inefficient and prone to errors. The Library Management System
(LMS) is a computerized solution designed to manage, organize, and maintain
the day-to-day operations of a library. It provides a systematic way of handling
the cataloging of books, tracking borrowings and returns, managing member
data, and ensuring proper stock maintenance of library materials.
This system plays a crucial role in improving the productivity of library staff,
reducing manual efforts, and offering better services to users. By automating
standard library functions, it ensures smoother operations and allows for real-
time tracking of books and users, significantly reducing errors and delays.
2. Purpose and Need
The purpose of a Library Management System is to make library services
more efficient and accessible. In manual systems, processes like book issuing,
returning, and record keeping are time-consuming and often inaccurate. These
inefficiencies can lead to misplaced books, incorrect fines, and long wait times
for users.
An LMS addresses these challenges by providing:
• Automated book tracking and inventory management
• User account and membership handling
• Real-time updates on book availability
• Fine calculation and overdue alerts
• Report generation for library performance and statistics
Libraries in educational institutions, public organizations, and private

6
institutions benefit greatly from adopting such a system, especially as they deal
with increasing user demands and larger inventories.

3. Features of a Library Management System

A comprehensive LMS typically includes the following features:

• Catalog Management: Allows efficient entry, classification, and


searching of books and other resources.
• Member Management: Manages user registrations, membership
renewals, and borrowing history.
• Circulation Management: Automates issuing, returning, renewing,
and reserving books.
• Barcode Integration: Facilitates fast scanning and identification of books
and user IDs.
• Search Functionality: Helps users find books by title, author, subject,
or keywords.
• Fine and Penalty Management: Calculates and notifies users of
overdue charges.
• Reporting and Analytics: Generates detailed reports on inventory status,
usage patterns, and library performance.
• User Interface: Provides both librarians and users with a friendly
interface to interact with the system.
4. Benefits
Implementing a Library Management System provides multiple benefits:
• Time-Saving: Reduces time spent on manual searches, registrations,
and updates.
• Accuracy: Minimizes errors in data entry, fines, and book tracking.

7
• Accessibility: Offers 24/7 access to digital catalogs and user
accounts (especially in web-based systems).
• Data Security: Protects user and library data through authentication
and backup features.
• Resource Optimization: Helps libraries manage space and
materials efficiently.

5. Conclusion

In conclusion, a Library Management System is an essential tool for


modern libraries that seek to improve service quality, optimize operations, and
meet the evolving needs of users. With features that support automation,
accessibility, and data-driven decision-making, LMS platforms have
transformed how libraries function today.
Whether in schools, colleges, or public institutions, the LMS contributes to a
more organized, efficient, and user-friendly library experience. Its
implementation marks a significant step toward digital transformation in
educational and informational services.

8
Source Code
import sqlite3
import os

# Database functions
def initialize_database():
conn = sqlite3.connect('Library_Mang_System_Database.db')
cursor = conn.cursor()

cursor.execute('''
CREATE TABLE IF NOT EXISTS books (
book_no TEXT PRIMARY KEY,
book_name TEXT NOT NULL,
author TEXT
)
''')

cursor.execute('''
CREATE TABLE IF NOT EXISTS students (
reg_no TEXT PRIMARY KEY,
name TEXT
)
''')

cursor.execute('''
CREATE TABLE IF NOT EXISTS transactions (
reg_no TEXT,
book_no TEXT,
book_name TEXT,
issue_date TEXT,
return_date TEXT,
FOREIGN KEY (reg_no) REFERENCES students(reg_no),
FOREIGN KEY (book_no) REFERENCES books(book_no)
)
''')

conn.commit()
conn.close()

# Original functions updated for SQL

9
def newstu():
initialize_database()
conn = sqlite3.connect('Library_Mang_System_Database.db')
cursor = conn.cursor()

reg_no = input("Enter registration number: ")


name = input("Enter student name: ")

try:
cursor.execute("INSERT INTO students (reg_no, name) VALUES (?, ?)",
(reg_no, name))
conn.commit()
print("Student registered successfully!")
except sqlite3.IntegrityError:
print("Student already exists!")
finally:
conn.close()

def Stu():
print("------------------------------------------")
print(" ********************************* ")
print(" 1 Take the Book")
print(" 2 Return the Book")
print(" 3 View the Pending Book")
print(" 5 Exit")
print(" ********************************* ")
print("------------------------------------------")
print(" ")
ch1 = input("Enter The Choice : ")
if ch1 == "1":
add()
elif ch1 == "2":
ret()
elif ch1 == "3":
view()
elif ch1 == "5":
exit()
else:
print("Enter the Right choice")

def view_stu():
initialize_database()
conn = sqlite3.connect('Library_Mang_System_Database.db')
cursor = conn.cursor()

10
print(" \n========= Students Database =========")
cursor.execute("SELECT * FROM students")
students = cursor.fetchall()

if not students:
print("No Student in Library database!")
else:
print(" Register No \tStudent Name ")
for student in students:
print(f" {student[0]} \t{student[1]}")
print(" \n========= Students Database =========")
conn.close()

def add():
initialize_database()
conn = sqlite3.connect('Library_Mang_System_Database.db')
cursor = conn.cursor()

reg_no = input("Enter the Reg No : ")


book_no = input("Enter Book No : ")
book_name = input("Enter Book Name : ")
issue_date = input("Enter Issue Date (YYYY-MM-DD): ")

cursor.execute("SELECT * FROM books WHERE book_no=?", (book_no,))


if not cursor.fetchone():
print("Book does not exist in database!")
conn.close()
return

cursor.execute("SELECT * FROM students WHERE reg_no=?", (reg_no,))


if not cursor.fetchone():
print("Student not registered!")
conn.close()
return

try:
cursor.execute('''
INSERT INTO transactions (reg_no, book_no, book_name, issue_date)
VALUES (?, ?, ?, ?)
''', (reg_no, book_no, book_name, issue_date))
conn.commit()
print("Book issued successfully!")
except sqlite3.Error as e:
print(f"Error issuing book: {e}")

11
finally:
conn.close()

def ret():
initialize_database()
conn = sqlite3.connect('Library_Mang_System_Database.db')
cursor = conn.cursor()

reg_no = input("Enter the Reg No : ")


book_no = input("Enter The Book Number : ")
return_date = input("Enter Return Date (YYYY-MM-DD): ")

try:
cursor.execute('''
UPDATE transactions
SET return_date = ?
WHERE reg_no = ? AND book_no = ? AND return_date IS NULL
''', (return_date, reg_no, book_no))

if cursor.rowcount == 0:
print("No active transaction found for this book and student!")
else:
conn.commit()
print("Book returned successfully!")
except sqlite3.Error as e:
print(f"Error returning book: {e}")
finally:
conn.close()

def view():
initialize_database()
conn = sqlite3.connect('Library_Mang_System_Database.db')
cursor = conn.cursor()

reg_no = input("Enter the Reg No : ")

cursor.execute('''
SELECT book_no, book_name, issue_date
FROM transactions
WHERE reg_no = ? AND return_date IS NULL
''', (reg_no,))

pending_books = cursor.fetchall()

12
conn.close()

if not pending_books:
print("No pending books for this student!")
else:
print("\nPending Books:")
print("---------------------------------------------------")
print("Book No \tBook Name \tIssue Date")
print("---------------------------------------------------")
for book in pending_books:
print(f"{book[0]} \t{book[1]} \t{book[2]}")

def addbook():
initialize_database()
conn = sqlite3.connect('Library_Mang_System_Database.db')
cursor = conn.cursor()

book_no = input(" Enter Book No : ")


book_name = input(" Enter Book Name : ")
author = input(" Enter Book Author : ")

try:
cursor.execute("INSERT INTO books (book_no, book_name, author) VALUES
(?, ?, ?)",
(book_no, book_name, author))
conn.commit()
print("Book added successfully!")
except sqlite3.IntegrityError:
print("Book already exists!")
finally:
conn.close()

def database():
initialize_database()
conn = sqlite3.connect('Library_Mang_System_Database.db')
cursor = conn.cursor()

print("\n========= Book Database =========")


cursor.execute("SELECT * FROM books")
books = cursor.fetchall()

if not books:
print("No books in database!")

13
else:
print("Book No \tBook Name \tAuthor")
for book in books:
print(f"{book[0]} \t{book[1]} \t{book[2]}")

conn.close()

# Original menu system


while True:
print(" ----------------**********---------------------")
print(" # Library Management System *")
print(" # 1. Librarian Login *")
print(" # 2. Student Login *")
print(" -----------------**********-------------------")
ch = input("Enter The Choice : ")

if ch == "1":
print("---------------------------------------------------------")
print(" ")
print(" Library Management System Your in Librarian Login")
print(" ")
print("---------------------------------------------------------")
print("-------------------------------------")
print(" 1. View Book Details ")
print(" 2. Add the Book to Database ")
print(" 3. View the Student List ")
print("-------------------------------------")
ch5 = input("Enter The Choice : ")
if ch5 == "1":
database()
elif ch5 == "2":
addbook()
elif ch5 == "3":
view_stu()

elif ch == "2":
print("-------------------------------------------------------")
print("")
print("* Library Management System Your in Student Login*")
print("")
print("-------------------------------------------------------")
print(" 1. New Student ")
print(" 2. Existing Student ")
print("-------------------------------------")

14
ch1 = input("Enter The Choice : ")
if ch1 == "1":
newstu()
elif ch1 == "2":
Stu()
else:
print("Enter correct choice")
else:
print("Please Select correct choice")

15
Output
// Add the Books to Library Database

// View the Books in Library Database

16
// Add the New students in Database

// View the Students Database

17
// Issue the Books to students

// Return the books to library

18
// View the Pending books in student

19
BIBLIOGRAPHY

• https://www.geeksforgeeks.org/pytho
n- programming-examples/
• https://www.geeksforgeeks.org/python-
reading-excel-file-using-openpyxl-
module/
• https://www.tutorialspoint.com/read-and-
write-to-an-excel-file-using-python-
openpyxl- module
• https://www.datacamp.com/tutorial/pytho
n- excel-tutorial

20

You might also like