Professional Documents
Culture Documents
PROJECT REPORT
SUBMITTED BY
PIYUSH GUPTA
DEEPAK PAREEK
GRADE: XII
VEDANTA ACADEMY
UTHUKULI
2023-2024
CERTIFICATE
in the subject Computer Science (083) laid down in the regulations of CBSE for
Staff In-charge
Principal
ACKNOWLEDGEMENT
I would also like thank my Principal R.Sadana who gave me the golden
opportunity to do this wonderful project on the topic “Library Management
System”, which also helped me in doing a lot of research and I came to know about
so many new experiences and gave me lot of exposure to task completion through
programming languages.
Secondly I would also like to thank my parents and friends who helped me a lot in
finishing this project within the limited time.
I am making this project not only for marks but to increase my knowledge.
Thank you everyone who has led this project happen directly and indirectly. Thank
you everyone.
TABLE OF CONTENTS
S.NO CONTENT
1. Introduction
2. Imported files and modules used
3. Entity Relationship Diagram
4. System development Life Cycle
5. Coding
6. Output Screens
7. Limitations and Future
enhancements
8. Hardware requirements
9. Bibliography
INTRODUCTION:-
Library Management System
Key Features:
1. Displaying information: Users can view details about books in the
library, including serial numbers and specific column values.
2. Updating data: Users can modify existing information in the
database by selecting a book based on its serial number and providing
new values for specified columns.
3. Borrowers information: The system includes functionality to
manage information related to book borrowers.
4. System closure: Users have the option to close the system when
they have completed their tasks.
This code snippet handles a part of the program's logic, including user
input, database queries, and conditional branching based on user
decisions. It is part of a larger menu-driven system for efficient
library management.
Problems associated with manual
management
Library is approached by people for the satisfaction of their thirst of
knowledge. Current manual system of the library management is very
complicated and lengthy. A large number of registers are maintained in
order to maintain the list of students, books & their details & student’s
details.
As explained before library management system is a big complicated
system, therefore the problems associated with manual management are
listed below:
• Time consuming
• Non availability of details
• Decreased efficiency and accuracy
• Difficult & confusing
• Error in Maintenance
PROPOSED SYTEM
Library World wishes to computerize its management system with the
help of data base. It allows the librarian to update existing application for his
own ease like books account management, developing ledgers, issuing and
returning books etc. Also on the other face the reader/students wants to be
computerized solution of the above. It entails looking into the duplication of
effort, bottlenecks, and inefficient existing procedures.
An automated system is to be developed for library management system
that performs the following tasks:
➢ Issuing of books
➢ Returning of books
➢ Adding new books
➢ Maintains students Information.
➢ Providing Stock Management.
➢ Fast updating of stock
➢ Security
Modules used in the completion of program:-
1. mysql.connector:
• connect():- This function commands the connection
of python and MySQL server to be made.
• cursor():- This function enables a cursor pointer in
the command line client of the MySQL server
• execute():- This function is used to execute the query
which is given as its parameter, this query is
executed in MySQL server.
• fetchall():- This function with already a cursor
present fetches all the result of the query present in
the command line of MySQL .
• commit():- This function lets a user permanently
save all the changes made in the transaction of a
database or table.
Entry Relationship Diagram:-
NAME
CREATE AUTHOR
QUANTITY
SEARCH
START
CLOSE
VIEW
BY NAME
cursor.execute("""
CREATE TABLE IF NOT EXISTS receiveregister (
ID INT,
FOREIGN KEY (ID) REFERENCES BOOK(ID),
student_name VARCHAR(100) NULL,
student_ID VARCHAR(100) NOT NULL ,
STATE VARCHAR(10) NOT NULL,
Date DATE NOT NULL
)
""")
cursor.execute("""
CREATE TABLE IF NOT EXISTS issueregister (
ID INT,
FOREIGN KEY (ID) REFERENCES BOOK(ID),
student_name VARCHAR(100) NULL,
student_ID VARCHAR(100) NOT NULL ,
STATE VARCHAR(10) NOT NULL,
Date DATE NOT NULL
)
""")
db.commit()
def display_books():
# Display all books in the library
cursor.execute("SELECT * FROM BOOK")
books = cursor.fetchall()
if not books:
print("No books in the library.")
else:
print("ID | Title | Author | Availablity")
print("---------------------------------------------------------------")
for book in books:
print(f"{book[0]:<4}| {book[1]:<25}| {book[2]:<25}| {book[3]:<8}")
def search_book(title):
# Search for a book by title
cursor.execute("SELECT * FROM BOOK WHERE title LIKE %s", ('%' + title + '%',))
books = cursor.fetchall()
if not books:
print("Book not found.")
else:
print("ID | Title | Author | Availablity")
print("---------------------------------------------------------------")
for book in books:
print(f"{book[0]:<4}| {book[1]:<25}| {book[2]:<25}| {book[3]:<8}")
def display_records():
# Display all books in the library
cursor.execute("SELECT * FROM issueregister")
records = cursor.fetchall()
if not records:
print("No records in the library.")
else:
print("ISSUE REGISTER")
print("ID | Student name | Student ID | STATE ")
print("--------------------------------------------------------------------")
for record in records:
print(f"{record[0]:<4}| {record[1]:<25}| {record[2]:<25}| {record[3]:<8}")
cursor.execute("SELECT * FROM receiveregister")
records = cursor.fetchall()
if not records:
print("No records in the library.")
else:
print(" RECEIVE REGISTER")
print("ID | Student name | Student ID | STATE ")
print("--------------------------------------------------------------------")
for record in records:
print(f"{record[0]:<4}| {record[1]:<25}| {record[2]:<25}| {record[3]:<8}")
def bookissue(ID, sname, Sid, Date):
cursor.execute("INSERT INTO issueregister (ID, student_name, student_ID, Date, STATE
) VALUES (%s, %s, %s, %s, 'Issued')", (ID, sname, Sid, Date))
cursor.execute("UPDATE BOOK SET Availablity='no' WHERE ID=%s;", (ID,))
print("Successfully issued...")
db.commit()
def bookreceive(ID, sname, Sid, Date):
cursor.execute("INSERT INTO receiveregister (ID, student_name, student_ID, Date,
STATE ) VALUES (%s, %s, %s, %s, 'Received')", (ID, sname, Sid, Date))
cursor.execute("UPDATE BOOK SET Availablity='yes' WHERE ID=%s;", (ID,))
print("Successfully received...")
db.commit()
def main():
while True:
print("\nLibrary Management System")
print("1. Add Book")
print("2. Display Books")
print("3. Search Book")
print("4. Book Issued")
print("5. Book Recieved")
print("6.Show all records of books")
print("7.Quit")
choice = input("Enter your choice (1-7): ")
if choice == "1":
title = input("Enter the title of the book: ")
author = input("Enter the author of the book: ")
availability = input("Enter the availablity of the book: ")
add_book(title, author, availability)
print("Book added successfully.")
else:
print("Invalid choice. Please enter a number between 1 and 4.")
if __name__ == "__main__":
main()
Output Screenshot:
Main Menu
Future Enhancements: -
• User management
• Search and Filtering
• Transaction management
• Logging
• Notification System
• Web interface
• Cloud Integration
• Data Validation
HARDWARE AND SOFTWARE
REQUIREMENTS
Hardware Requirements:
• Processor - Intel® Atom™ CPU Z3735F @ 1.33 GHz
• RAM - 2.00 GB
• Keyboard
• Mouse
Software Requirements:
• Windows 10
• OS.build - 15063.1418 32 bit
• Python IDLE
• MySQL
1. www.slideshare.net
2. www.geeksforgeeks.org
3. www.google.com
4. Computer Science with Python
by Sumita Arora Class XII