0% found this document useful (0 votes)
30 views57 pages

Slms

Uploaded by

giraffesrtall26
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)
30 views57 pages

Slms

Uploaded by

giraffesrtall26
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/ 57

D.A.

V GROUP OF SCHOOLS
PALLIKARANAI

ACADEMIC YEAR 2024-2025


COMPUTER SCIENCE PROJECT
School Library Management System

NAME: M. Jayanieca
CLASS: XII-D
ROLL NO:
D.A.V. SCHOOL – PALLIKARANAI
DEPARTMENT OF COMPUTER SCIENCE

Name : M.Jayanieca Roll No :


Class : XII Regd.No :

CERTIFICATE
Certified that this is a bonafide report of
School Library Management System work done by
M.Jayanieca during the year 2024 – 2025.

Teacher-In-Charge

Submitted for the Practical Examination in Computer Science (083) at DAV School

Pallikaranai held on …………………………………….

Internal Examiner

External Examiner The Principal


Contents
• Introduction 1
• Python and its Applications
o Overview of python 3
o Key features of python 4
o Applications of python 6
• MySQL and Its Applications with Python Interface
o Overview of MySQL 7
o Application of MySQL with Python Interface 8
• Tkinter in Python 9
• Hardware and Software Requirements
o Hardware Requirements 10
o Software Requirements 10
• Objectives 11
• Functions
o User defined functions 14
o Tkinter functions and widgets 17
• Flowchart 19
• Source Code 21
• SQL Table 35
• Output 38
• Conclusion and Future Advancements 51
• Bibliography 54
Introduction

The Library Management System (LMS) is designed to streamline and automate key
functions of library operations, allowing efficient management of books, members,
and borrowing activities. Developed using Python's Tkinter library for the graphical
user interface (GUI) and MySQL for the backend database, this application combines
an intuitive, user-friendly design with a robust database to handle and track library
resources. The LMS includes core functionalities such as adding new books to the
database, searching for books based on various criteria (title, author, genre), issuing
and returning books with due date management, and tracking for overdue returns.

A standout feature of this system is the integration with MySQL, enabling secure,
structured storage and retrieval of data. This ensures that book records, member
details, and transaction histories are preserved accurately, enhancing the reliability
of the system. The Tkinter GUI simplifies the interaction process, allowing librarians
to interact with the LMS via a menu-driven interface where each function is clearly
labeled. Each major operation, from adding a book to retrieving the list of issued
books, is presented with user prompts, ensuring ease of use even for those with
limited technical knowledge.

1|Page
The LMS also facilitates effective management of borrowing rules by implementing
automated due date calculations and fine assessments. When a book is issued, the
system sets a two-week borrowing period, automatically calculating and updating
the due date in the system. Additionally, the fine calculation feature charges a
nominal fee for each day a book is overdue, providing a structured way to handle late
returns. Beyond this, the system includes a student detail feature that retrieves and
displays information about a particular student, enabling staff to quickly verify
member data. Together, these features create a robust library environment where
daily activities are managed efficiently, promoting better resource management and
a smoother experience for both librarians and members.

2|Page
Python and its Applications
1. Overview of Python

Python is a high-level, interpreted programming language known for its simplicity,


versatility, and readability. Created by Guido van Rossum in the late 1980s and first
released in 1991, Python was designed to emphasize code readability and allow
programmers to express complex ideas with fewer lines of code. The language is
dynamically typed, which means that variable types do not need to be declared
explicitly, making coding and debugging easier and faster.

Python supports multiple programming paradigms, including procedural, object-


oriented, and functional programming, and comes with a comprehensive standard
library. Its philosophy emphasizes the importance of readability and simplicity, with
a syntax designed to be clean and accessible even for beginners. These qualities
have contributed to Python’s popularity across various fields, from software
development to scientific computing, web development, and artificial intelligence.

Python’s global community is large and active, with thousands of open-source


libraries and frameworks available. This ecosystem, along with continuous support
from Python Software Foundation, has helped Python evolve into one of the most
widely used programming languages today.

3|Page
2. Key Features of Python

Python’s popularity is largely due to its unique and powerful features, which make it
suitable for both beginners and experienced programmers. Below are some of its key
features:

• Simplicity and Readability

Python's syntax is designed to be intuitive, allowing developers to focus on solving


problems rather than worrying about complex syntax. Its readable structure
resembles the English language, making it accessible and lowering the learning curve
for beginners. The simplicity of Python code also enhances productivity, as
developers can write and understand code more quickly.

• Interpreted Language

Python is an interpreted language, meaning that code is executed line by line, which
allows for immediate error detection and debugging. Unlike compiled languages,
such as C or Java, Python does not require a separate compilation step, making it
highly flexible and ideal for rapid development and testing.

• Cross-Platform Compatibility

Python is a cross-platform language, meaning that it can run on various operating


systems, including Windows, macOS, and Linux, without modification. This feature
makes it highly portable, as developers can write code once and deploy it across
different systems seamlessly. The cross-platform nature of Python makes it
especially useful for developing applications intended to run on multiple platforms

4|Page
• Extensive Standard Library

Python comes with a rich standard library, which provides modules and functions for
handling a wide variety of tasks, such as file handling, system interfaces, and even
internet protocols. The extensive library helps programmers accomplish tasks
without needing to write code from scratch. Additionally, Python has a vast
ecosystem of third-party libraries available via the Python Package Index (PyPI),
allowing developers to expand Python’s functionality even further.

• Support for Multiple Paradigms

Python supports multiple programming paradigms, including procedural, object-


oriented, and functional programming. This flexibility allows developers to use
Python for various purposes and choose the most suitable paradigm based on the
problem they are solving. The language’s versatility has made it popular in fields as
diverse as web development, data analysis, artificial intelligence, and automation.

• Dynamic Typing

Python is dynamically typed, meaning that variable types are determined at runtime.
This reduces the amount of code needed to declare and initialize variables and
makes it easier to prototype and test code. However, dynamic typing also requires
careful management to avoid runtime errors, which Python helps mitigate with clear
error messages.

5|Page
3) Applications of Python

Python’s versatility and robust ecosystem make it suitable for a wide range of
applications, from web development to machine learning. Some of the primary
applications of Python are discussed below

• Web Development

Python has become a popular choice for web development due to frameworks like
Django and Flask. Django is a high-level web framework that promotes rapid
development and clean, pragmatic design. Flask, a micro-framework, offers more
flexibility and is preferred for smaller applications and projects where developers
want control over components. Both frameworks enable developers to build secure,
scalable, and maintainable web applications efficiently.

• Game Development

While Python is not as widely used in game development as other languages like C++
or Java, it has frameworks such as Pygame that simplify game development for
beginners. Pygame is a set of Python modules designed for creating 2D games, and
it’s commonly used in educational settings to introduce programming and game
design concepts.

• Desktop GUI Applications

Python can also be used to create desktop graphical user interface (GUI) applications
with libraries like Tkinter, PyQt, and Kivy. Tkinter, which comes pre-installed with
Python, is a simple tool for creating basic GUI applications

6|Page
MySQL and Its Applications with Python Interface

1. Objective of MySQL

MySQL is an open-source relational database management system (RDBMS)


developed by Oracle Corporation. Its primary objective is to efficiently store, retrieve,
and manage data using a structured format. MySQL is widely used to power dynamic
websites and web applications by providing fast and reliable access to data, from
simple records to complex information stored in relational databases. Based on
Structured Query Language (SQL), MySQL enables developers to execute complex
queries, perform CRUD (Create, Read, Update, Delete) operations, and maintain
data integrity. The objective of MySQL goes beyond mere data storage, as it is
designed to handle extensive data processing needs and support large-scale, multi-
user applications.

MySQL is optimized for performance and security, with mechanisms for indexing,
transaction management, and user access control. These features allow MySQL to
serve a diverse range of applications, from lightweight content management systems
(CMS) to high-performance enterprise applications. Additionally, MySQL is designed
to be cross-platform, enabling deployment on Windows, macOS, Linux, and Unix
systems. Its scalability and reliability make it one of the most popular choices for
databases worldwide.

7|Page
2. Applications of MySQL with Python Interface

Python, with its flexible and robust capabilities, is often used in combination with
MySQL to build, manage, and interact with databases. Through Python’s libraries
such as MySQL Connector and SQLAlchemy, developers can perform database
operations in a structured and programmatic manner, making Python and MySQL a
powerful pair for data-driven applications. Below are some key applications of
MySQL with Python:

• Web Development and Backend Services

One of the most common applications of MySQL with Python is in web development,
where MySQL is used as the primary database for storing user data, session data,
and content. Python web frameworks such as Django and Flask integrate well with
MySQL to manage database connections and handle requests.

• Machine Learning and AI Applications

In machine learning (ML) and artificial intelligence (AI) projects, MySQL is often used
as a data source to store training and testing data. With Python’s machine learning
libraries such as Scikit-Learn, TensorFlow, and Keras, developers can pull data from
MySQL, process it, and feed it into ML models for training and prediction. Since
machine learning models require large volumes of data, MySQL’s ability to handle
structured and relational data is beneficial for organizing and retrieving datasets in an
efficient manner.

8|Page
Tkinter in Python
Tkinter is the standard GUI (Graphical User Interface) library for Python, providing a
powerful toolkit for creating user-friendly applications with visual elements. Its
primary objective is to enable Python developers to build desktop applications with
windows, buttons, text boxes, and other interactive components without needing
extensive knowledge of advanced GUI frameworks. By abstracting complex GUI
programming details, Tkinter offers a simplified way to design interfaces that handle
user input and display information effectively.

Tkinter's widgets include standard components like labels, buttons, checkboxes,


radio buttons, text fields, menus, and canvas for drawing shapes, allowing
developers to create functional and visually engaging applications. With event-driven
programming, Tkinter enables applications to respond to user actions, making it
versatile for applications ranging from simple tools to more complex interactive
programs.

As an integral part of Python’s standard library, Tkinter is accessible across different


operating systems (Windows, macOS, Linux) without requiring additional installation,
making it ideal for developing cross-platform applications. Furthermore, its
integration with Python allows for creating applications that can handle backend
processing, data management, and advanced logic seamlessly alongside the GUI.

9|Page
Hardware and Software Requirements

Hardware Requirements

1. Computer: A computer or laptor of basic processing, power(Interl i3/AMD


Ryzen 3 or higher) is suitable for running this Python program, as it is not
resource-intensive
2. RAM: At lease 4GB of RAM is recommended, though 8GM or more would
provide smoother performance, especially if additional applications are used
simultaneously.
3. Storage: Basic storage space(minimum 500 MB) to accommodate Python,
necessary libraries , and the library_management.pkl data where data is
stored
4. Input devices: Keyboard and mouse fir entering and managing data
5. Display: Any standard monitor or laptop display will suffice for viewing and
interfacing with the menu driven program

Software Requirement

1. Operating system: Windows,macOS or Linux


2. Python version: python 3.13
3. Command-Line Interface: To connect python to MySQL
4. MySQL version: MySQL 8.0

10 | P a g e
Objective
1. Efficient Library Resource Management: The code aims to create a
comprehensive digital system for managing library resources, including books and
member records. It automates book cataloging, issuance, returns, and fine
calculation, significantly reducing manual workload

2. User-Friendly Interface: With the use of Python's Tkinter library, the code
provides an intuitive graphical user interface (GUI) that allows library staff to perform
tasks such as adding new books, searching for books, issuing books to students, and
processing book returns with minimal training

3. Real-Time Data Processing: The code integrates Python with MySQL to store and
retrieve data in real time. This integration ensures up-to-date records, allowing the
library staff to track books accurately and keep records of active and overdue issued
books.

4. Error Handling and Data Integrity: By including error handling in the MySQL
database connection and other critical operations, the code ensures robustness and
prevents data loss or corruption. Constraints, such as unique identifiers and
automated primary keys, maintain database integrity.

11 | P a g e
5. Automated Fine Calculation: The code automatically calculates fines based on
the number of overdue days for returned books. This feature streamlines the return
process and enforces timely book returns, enhancing accountability among users.

6. Enhanced Search and Filter Functionality: The code provides search


functionality that allows library staff to quickly find books by title, author, or genre,
making it easier to locate resources and serve library users more efficiently.

7. Scalability and Extensibility: The code is designed with scalability in mind,


allowing for additional features to be added in the future, such as student self-service
modules, advanced reporting, and integration with other library systems.

8. Educational and Practical Application: This project serves as a practical example


of combining software development skills, such as database management and GUI
programming, with real-world applications in library management. It demonstrates
the principles of modular coding, structured database design, and interactive user
interface development.

12 | P a g e
Functions

13 | P a g e
User defined functions:

1. addbookwindow()

This function creates a new window for adding a book to the library database. It
contains text fields for entering the book's title, author, and genre.When the "Add
Book" button is clicked, the book's details are inserted into the `books` table in the
database.It also performs error handling, ensuring that all fields are filled before
adding a book.

2. searchbookwindow()

This function creates a new window where users can search for books in the library
database by title, author, or genre. Users enter a search term in the provided field, and
the program queries the database for books matching the search term. Results are
displayed in a `Listbox`, and each entry shows the book's ID, title, author, and genre.

14 | P a g e
3. showbookwindow()

This function creates a window displaying a list of all books in the library. It uses a
`Treeview` widget to show book details (ID, Title, Author, and Genre) in a table
format. It fetches the data from the `books` table in the database and inserts the
records into the treeview.

4. issuebookwindow()

This function creates a new window to issue a book to a student. It prompts the user
for the `book_id` and `student_id`.When the "Issue Book" button is clicked, it
inserts a record into the `issued_books` table with the issue date and calculates a
due date (14 days from the issue date) A confirmation message with the due date is
displayed.

5. returnbookwindow()

This function creates a new window to return a book.It asks for the `issue_id` (which
links the book and the student)The return date is logged, and if the return is late, a fine
is calculated based on how many days late the book is returned.It updates the
`issued_books` table with the return date and any applicable fine.

15 | P a g e
6. howstudentwindow()

This function creates a window to show details of a student based on their name.The
user enters a student's name, and the program queries the `students` table for a
matching student record If the student is found, their details (ID, name, email, and
phone) are displayed in a message box.

7.showissuetablewindow()

This function creates a new window to display a table of all issued books.It uses a
`Treeview` widget to show details of each issued book, such as `Issue ID`, `Book
ID`, `Member ID`, `Issue Date`, `Due Date`, `Return Date`, and `Fine`. It
queries the `issued_books` table and displays all the records in the treeview.

16 | P a g e
Tkinter Functions and widgets:

1. Tk()

Creates the main Tkinter window. It's the starting point of the application.Every
Tkinter application needs to have one `Tk()` instance as the root window.

2. Toplevel()

Creates a new top-level window (a separate window on top of the main window).
Used when you want to open new windows for different functionalities (like adding
books, issuing books, etc.) while keeping the main window intact.

3. Label()

`Label` is a widget used to display text or an image. It doesn't allow user interaction;
it's used to provide information.`text` specifies the content to display, and `bg` sets
the background color of the label.`font` changes the text style.`pack()` and `grid()`
are geometry managers used to place the label within the window.

4. Entry()

`Entry` is a widget used to create text input fields where users can type data (e.g.,
book titles, student names). Users interact with it to input values.

17 | P a g e
5. Button()

`Button` is used to create clickable buttons in your GUIThe `text` argument defines
the text shown on the button The `command` argument links the button to a
function, so when the button is clicked, that function is executed.

6. Listbox()

Users can select one or more items from the list. In your code, it's used to display
search results for books, where each result is a string showing the book's ID, title,
author, and genre.

7.pack()

It is used to automatically place widgets within the window.Widgets can be packed


in the available space (horizontally or vertically).

8.grid()

`grid()` is another geometry manager in Tkinter, used to place widgets in a table-like


structure with rows and columns. You specify the `row` and `column` to place the
widget at a particular position.

9.messagebox()

These dialog boxes are modal, meaning the user must acknowledge them before
interacting with the main window again.

18 | P a g e
Flowchart

19 | P a g e
20 | P a g e
Source code

21 | P a g e
import mysql.connector

from tkinter import *

from tkinter import messagebox, ttk

from datetime import datetime, timedelta

# MySQL connection with error handling

try:

mydb = mysql.connector.connect(

host="localhost",

user="root",

password="root",

database="library_management"

cursor = mydb.cursor()

except mysql.connector.Error as err:

messagebox.showerror("Database Connection Error", f"Error: {err}")

exit()

# Set up common window properties

WINDOW_SIZE = "500x500"

BACKGROUND_COLOR = "#E6E6FA" # Lavender color

# Function to add a book

22 | P a g e
def addbookwindow():

add_window = Toplevel(root)

add_window.title("Add Book")

add_window.geometry(WINDOW_SIZE)

add_window.configure(bg=BACKGROUND_COLOR)

Label(add_window, text="Title", bg=BACKGROUND_COLOR).grid(row=0,


column=0)

title_entry = Entry(add_window)

title_entry.grid(row=0, column=1)

Label(add_window, text="Author", bg=BACKGROUND_COLOR).grid(row=1,


column=0)

author_entry = Entry(add_window)

author_entry.grid(row=1, column=1)

Label(add_window, text="Genre", bg=BACKGROUND_COLOR).grid(row=2,


column=0)

genre_entry = Entry(add_window)

genre_entry.grid(row=2, column=1)

def add_book():

try:

title = title_entry.get()

23 | P a g e
author = author_entry.get()

genre = genre_entry.get()

if title and author and genre:

cursor.execute("INSERT INTO books (title, author, genre) VALUES


(%s, %s, %s)", (title, author, genre))

mydb.commit()

messagebox.showinfo("Success", "Book added successfully!")

add_window.destroy()

else:

messagebox.showwarning("Input Error", "Please fill in all fields")

except mysql.connector.Error as err:

messagebox.showerror("Database Error", f"Error: {err}")

Button(add_window, text="Add Book", command=add_book).grid(row=3,


column=1)

# Function to search books

def searchbookwindow():

search_window = Toplevel(root)

search_window.title("Search Books")

search_window.geometry(WINDOW_SIZE)

search_window.configure(bg=BACKGROUND_COLOR)

24 | P a g e
Label(search_window, text="Search", bg=BACKGROUND_COLOR).grid(row=0,
column=0)

search_entry = Entry(search_window)

search_entry.grid(row=0, column=1)

search_result_list = Listbox(search_window, width=60, height=8)

search_result_list.grid(row=1, column=0, columnspan=2, padx=10, pady=10)

def search_books():

try:

query = search_entry.get()

cursor.execute("SELECT * FROM books WHERE title LIKE %s OR author


LIKE %s OR genre LIKE %s",

(f"%{query}%", f"%{query}%", f"%{query}%"))

results = cursor.fetchall()

search_result_list.delete(0, END)

for row in results:

search_result_list.insert(END, f"ID: {row[0]}, Title: {row[1]}, Author: {row[2]},


Genre: {row[3]}")

except mysql.connector.Error as err:

messagebox.showerror("Database Error", f"Error: {err}")

25 | P a g e
Button(search_window, text="Search", command=search_books).grid(row=2,
column=1)

# Function to show list of books in a table

def showbookwindow():

show_window = Toplevel(root)

show_window.title("List of Books")

show_window.geometry(WINDOW_SIZE)

show_window.configure(bg=BACKGROUND_COLOR)

# Setting up the treeview for table format

tree = ttk.Treeview(show_window, columns=("ID", "Title", "Author", "Genre"),


show="headings")

tree.heading("ID", text="ID")

tree.heading("Title", text="Title")

tree.heading("Author", text="Author")

tree.heading("Genre", text="Genre")

# Adjusting column widths

tree.column("ID", width=50, anchor=CENTER)

tree.column("Title", width=150, anchor=W)

tree.column("Author", width=100, anchor=W)

tree.column("Genre", width=100, anchor=W)

# Fetching data and inserting into the table

26 | P a g e
try:

cursor.execute("SELECT * FROM books")

for row in cursor.fetchall():

tree.insert("", END, values=row)

except mysql.connector.Error as err:

messagebox.showerror("Database Error", f"Error: {err}")

tree.pack(padx=10, pady=10, expand=True, fill=BOTH)

# Function to issue a book

def issuebookwindow():

issue_window = Toplevel(root)

issue_window.title("Issue Book")

issue_window.geometry(WINDOW_SIZE)

issue_window.configure(bg=BACKGROUND_COLOR)

Label(issue_window, text="Book ID", bg=BACKGROUND_COLOR).grid(row=0,


column=0)

book_id_entry = Entry(issue_window)

book_id_entry.grid(row=0, column=1)

Label(issue_window, text="Member ID", bg=BACKGROUND_COLOR).grid(row=1,


column=0)

student_id_entry = Entry(issue_window)

27 | P a g e
student_id_entry.grid(row=1, column=1)

def issue_book():

try:

book_id = book_id_entry.get()

student_id = student_id_entry.get()

issue_date = datetime.now()

due_date = issue_date + timedelta(days=14) # 14 days due period

cursor.execute("INSERT INTO issued_books (book_id, student_id, issue_date,


due_date) VALUES (%s, %s, %s, %s)",

(book_id, student_id, issue_date, due_date))

mydb.commit()

# Show the due date to the user

messagebox.showinfo("Book Issued", f"Book issued successfully!\nDue Date:


{due_date.strftime('%Y-%m-%d')}")

issue_window.destroy()

except mysql.connector.Error as err:

messagebox.showerror("Database Error", f"Error: {err}")

Button(issue_window, text="Issue Book", command=issue_book).grid(row=2,


column=1)

# Function to return a book

28 | P a g e
def returnbookwindow():

return_window = Toplevel(root)

return_window.title("Return Book")

return_window.geometry(WINDOW_SIZE)

return_window.configure(bg=BACKGROUND_COLOR)

Label(return_window, text="Issue ID", bg=BACKGROUND_COLOR).grid(row=0,


column=0)

issue_id_entry = Entry(return_window)

issue_id_entry.grid(row=0, column=1)

def return_book():

try:

issue_id = issue_id_entry.get()

return_date = datetime.now()

cursor.execute("SELECT due_date FROM issued_books WHERE issue_id


= %s", (issue_id,))

due_date = cursor.fetchone()[0]

# Convert return_date to date type for comparison

if return_date.date() > due_date:

days_late = (return_date.date() - due_date).days

fine = days_late * 5 # Rs.5 fine per day late

29 | P a g e
cursor.execute("UPDATE issued_books SET fine = %s WHERE issue_id = %s",
(fine, issue_id))

else:

fine = 0

cursor.execute("UPDATE issued_books SET return_date = %s WHERE issue_id


= %s", (return_date, issue_id))

mydb.commit()

messagebox.showinfo("Success", f"Book returned successfully with a fine of


${fine}" if fine else "Book returned successfully")

return_window.destroy()

except mysql.connector.Error as err:

messagebox.showerror("Database Error", f"Error: {err}")

Button(return_window, text="Return Book", command=return_book).grid(row=1,


column=1)

# Function to show student details based on name

def showstudentwindow():

student_window = Toplevel(root)

student_window.title("Show Student")

student_window.geometry(WINDOW_SIZE)

student_window.configure(bg=BACKGROUND_COLOR)

30 | P a g e
Label(student_window, text="Student Name",
bg=BACKGROUND_COLOR).grid(row=0, column=0)

student_name_entry = Entry(student_window)

student_name_entry.grid(row=0, column=1)

def show_student():

student_name = student_name_entry.get()

cursor.execute("SELECT * FROM students WHERE name = %s", (student_name,))

student = cursor.fetchone()

if student:

student_info = f"ID: {student[0]}\nName: {student[1]}\nEmail:


{student[2]}\nPhone: {student[3]}"

messagebox.showinfo("Student Details", student_info)

else:

messagebox.showwarning("Not Found", "Student not found")

Button(student_window, text="Show Details",


command=show_student).grid(row=1, column=1)

# Function to show issued books in a table format

def showissuetablewindow():

issue_window = Toplevel(root)

issue_window.title("Issued Books")

issue_window.geometry(WINDOW_SIZE)

31 | P a g e
issue_window.configure(bg=BACKGROUND_COLOR)

tree = ttk.Treeview(issue_window, columns=("Issue ID", "Book ID", "Member ID",


"Issue Date", "Due Date", "Return Date", "Fine"), show="headings")

for col in tree["columns"]:

tree.heading(col, text=col)

try:

cursor.execute("SELECT * FROM issued_books")

for row in cursor.fetchall():

tree.insert("", END, values=row)

except mysql.connector.Error as err:

messagebox.showerror("Database Error", f"Error: {err}")

tree.pack(padx=10, pady=10, expand=True, fill=BOTH)

# Tkinter main window setup with menu

root = Tk()

root.title("Library Management System")

root.geometry(WINDOW_SIZE)

root.configure(bg=BACKGROUND_COLOR)

# Centered "MENU" title with options listed

Label(root, text="DAV SCHOOL PALLIKARANAI", font=("Arial", 40, "bold"),


bg=BACKGROUND_COLOR).pack(pady=10)

32 | P a g e
Label(root, text="SCHOOL LIBRARY MANAGEMENT SYSTEM", font=("Arial", 32,
"bold"), bg=BACKGROUND_COLOR).pack(pady=10)

Label(root, text="MENU", font=("Arial", 24, "bold"),


bg=BACKGROUND_COLOR).pack(pady=10)

Label(root, text="1. Add Book\n2. Search Book\n3. Show Book List\n4. Issue
Book\n5. Return Book\n6. Show Student Details\n7. Show Issued Books",

font=("Arial", 14), bg=BACKGROUND_COLOR, justify=CENTER).pack(pady=10)

# Menu bar setup

menubar = Menu(root)

root.config(menu=menubar)

# Adding commands to the menu bar

book_menu = Menu(menubar, tearoff=0)

book_menu.add_command(label="Add Book", command=addbookwindow)

book_menu.add_command(label="Search Books", command=searchbookwindow)

book_menu.add_command(label="Show Book List", command=showbookwindow)

menubar.add_cascade(label="Books", menu=book_menu)

issue_menu = Menu(menubar, tearoff=0)

issue_menu.add_command(label="Issue Book", command=issuebookwindow)

issue_menu.add_command(label="Return Book", command=returnbookwindow)

menubar.add_cascade(label="Issue/Return", menu=issue_menu)

33 | P a g e
# Adding new menu items

student_menu = Menu(menubar, tearoff=0)

student_menu.add_command(label="Show Student Details",


command=showstudentwindow)

menubar.add_cascade(label="Students", menu=student_menu)

issue_table_menu = Menu(menubar, tearoff=0)

issue_table_menu.add_command(label="Show Issued Books",


command=showissuetablewindow)

menubar.add_cascade(label="Issued Books", menu=issue_table_menu)

root.mainloop()

34 | P a g e
SQL Tables

35 | P a g e
Books

Issued_books

36 | P a g e
Students

37 | P a g e
Output

38 | P a g e
Home screen

39 | P a g e
Add Book

40 | P a g e
41 | P a g e
Search Book

42 | P a g e
Show Book List

43 | P a g e
Issue Book

44 | P a g e
45 | P a g e
Return Book

46 | P a g e
47 | P a g e
Show Student Details

48 | P a g e
49 | P a g e
Show Issued Book list

50 | P a g e
Conclusion and Future Advancements
This Library Management System successfully addresses the critical aspects of
library management by automating core tasks, enhancing data accuracy, and
improving the overall user experience for library staff. The LMS provides significant
advantages over manual management, including reduced human error, a centralized
database for all book and member information, and streamlined borrowing and
return processes. It efficiently meets the needs of smaller libraries, providing
essential functions in a structured and user-friendly environment. However, as
libraries continue to evolve in the digital age, there is room for future advancements
to keep up with growing demands and expectations.

One potential area for improvement is the integration of an online platform, allowing
users to access the library catalog, check book availability, and reserve books
remotely. This feature would require additional work to establish a secure connection
between the user’s interface and the library’s database, but it would offer
convenience and accessibility, enhancing the LMS's reach. Additionally,
implementing an email or SMS notification system could alert users about due dates
or overdue fines, encouraging timely returns and improving book circulation rates.

51 | P a g e
Another possible enhancement is the addition of analytics features, allowing library
staff to generate reports on book popularity, genre demand, and borrowing patterns.
These insights could inform purchasing decisions and better resource allocation,
ensuring the library’s collection aligns with the needs and interests of its members.
Furthermore, integrating barcode or RFID scanning technology would streamline the
check-in/check-out process, reducing the time required to manually enter book IDs
and further minimizing human error.

For larger libraries, an upgraded version of the LMS could incorporate cloud-based
storage, enabling multiple branches to access a centralized database. Cloud
integration would also provide data backup and recovery options, ensuring that all
records remain secure and available even in the event of local system failure. This
type of advancement would be ideal for libraries with multiple locations, allowing for
a unified system across all branches.

52 | P a g e
In terms of technical architecture, converting the LMS to a web-based application or
mobile app could make it platform-independent and more accessible. By
transitioning to a web framework such as Django or Flask, the system could provides
a seamless experience across various devices, from desktops to smartphones,
catering to the needs of users and staff who may prefer to manage library tasks on-
the-go.

Overall, this Library Management System has achieved its primary goals of
simplifying library operations and improving the accuracy of resource tracking.
However, with the inclusion of advanced features and modern technologies, it has
the potential to evolve into a comprehensive tool capable of meeting the demands of
larger libraries and a digitally-oriented user base. By exploring these future
advancements, the LMS can continue to provide invaluable support to library staff
and enhance the experience for users, ultimately contributing to a more connected
and efficient library environment

53 | P a g e
Bibliography

• Sumita Arora class 12

• https://www.geeksforgeeks.org/mysql-tutorial/

• https://www.geeksforgeeks.org/mysql-tutorial/

• https://www.tutorialspoint.com/python/python_gui_programming.ht
m

54 | P a g e

You might also like