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

Computer Science Investigatory Project: Topic: Submitted By: Class: School: Place

This document describes a library management system project submitted by Sheethala Shivani.S. The project aims to develop a software to manage library functions like maintaining book records and issuing books. It includes an acknowledgement, table of contents, statement of problem, introduction, objectives, hardware and software requirements, functions and modules, detailed description, source code, outputs and tables, and bibliography sections. The source code section provides Python code to connect to a MySQL database and perform functions like adding, issuing, returning, and deleting books.
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)
39 views

Computer Science Investigatory Project: Topic: Submitted By: Class: School: Place

This document describes a library management system project submitted by Sheethala Shivani.S. The project aims to develop a software to manage library functions like maintaining book records and issuing books. It includes an acknowledgement, table of contents, statement of problem, introduction, objectives, hardware and software requirements, functions and modules, detailed description, source code, outputs and tables, and bibliography sections. The source code section provides Python code to connect to a MySQL database and perform functions like adding, issuing, returning, and deleting books.
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/ 36

COMPUTER SCIENCE

INVESTIGATORY PROJECT

TOPIC: Library Management System


SUBMITTED BY: Sheethala Shivani.S
CLASS : XII
SCHOOL : Vivekanandam Vidyashram
PLACE : Thiruvarur
ACKNOWLEDGEMENT

I would like to thank my principal Mrs.


Mahalakshmi, who gave me the opportunity for
this useful project, which helped me to come
across more things in day-to-day life. I wish I
would like to thank my parents for their
encouragement and support without which I
could have not completed the project in the
allotted time.
In the end, I would like to thank my friends who
appreciated my work and motivated me to
continue my work.
TABLE OF CONTENTS

S.NO CONTENT PAGE NO.


1. STATEMENT OF PROBLEM 4
2. INTRODUCTION 5
3. OBJECTIVE OF THE PROJECT 6
4. HARDWARE AND SOFTWARE REQUIREMENTRS 6
5. FUNCTIONS AND MODULES 7
6. DETAILED DESCRIPTION 8
7. SOURCE CODE 9
8. OUTPUTS AND TABLES 17
9. BIBLIOGRAPHY 26
STATEMENT OF PROBLEM

To develop a software named LIBRARY MANAGEMENT


SYSTEM to manage manual functions of a library. The
software helps to manage the entire library operations
from maintaining book records to issue a book. In
addition, it allows streamlined management of fine
details of books such as author name, costing, number
of copies existing in the library and many other
important details. It makes it easier to search for books
and find the right materials for students and the
librarian instantly.

Page 4 of 26

INTRODUCTION :
LMS (Library Management System)is also called an automated
library system. It is defined as software that has been established to
manage basic housekeeping function of a library.
The electronic management via the software is essential to track
information like issue date, due date who has borrowed any book
etc. The System is developed and designed with an aim to facilitate
efficient management to the schools to manage a modern library
with accurate data management. The software is intended to reduce
the manual work to manage library functions which have various
features.

IMPORTANCE OF A LMS IN SCHOOL EDUCATION


Library management systems facilitate the administrators to keep an
eye on the library departments all functions. Also, it enables
librarians and users to save time on daunting tasks and enhances
efficiency. By using this sort of library management system, the
school management would be able to follow the work outline and
fineness of different librarians’ capabilities. Additionally, they get an
opportunity to know how well maintained the record of issued books
and collection is. The librarian and the administrative department can
access various reports to implement new improvements.
Thus, the efficient library management software is essential to run
smart school functions, and maintain accurate data of a library.

Page 5 of 26

OBJECTIVE OF THE PROJECT :


The library management system is designed to meet the following
objectives :
❖ Simple and easy to operate.
❖ Increase librarian’s efficiencies.
❖ Search, add, update, and view library materials.
❖ Helps to manage library functions constructively.
❖ Saves time and reduces overheads.
❖ Reduce library’s operating cost.
❖ Customized reports for better management.
❖ Remove manual processes to issue books and maintain
records.

HARDWARE AND SOFTWARE REQUIREMENTS

Hardware Requirements :

❖ OPERATING SYSTEM : Windows 7 and above


❖ PROCESSESOR : x86 64-bit CPU(Intel/AMD
architecture) ❖ MOTHER BOARD :1.845 OR 915,995
FOR PENTIUM OR MSI K9MM-V VIA K8M 800+8237R
PLUS CHITSET FOR AMD ATHALON
❖ RAM : 4 GB
❖ HARD DISK : SATA 40 GB OR ABOVE

Page 6 of 26

Software Requirements:
❖ Windows OS
❖ IDLE (Python 3.7 32 bit
❖ MYSQL workbench
❖ Python-mysql connector (mysql.connector module)

FUNCTIONS AND MODULES

Modules:
Module is a file that contains code to perform a specific task. A
module may contain variables, functions, classes, etc...
Module used in this project is:
import mysql.connecter:
By importing this package, we are able to establish the connection
between SQL and Python.
Functions:
A function is a set of instructions defined under a particular name,
which once written can be called whenever required. Functions
can be categorized into two types:

• Built-in
• User-defined
I have listed the used functions, their purpose and syntax in
this section. connect():
This function establishes connection between Python and MySQL.
cursor():
It is a special control structure that facilitates the row-by-row
Page 7 of 26

processing of records in the result set.


The syntax is:
<cursor object>=<connection object>.cursor()
execute():
This function is used to execute the SQL query and retrieve records
using python.
The syntax is:
<cursor object>.execute(<sql query string>)
def():
A function is a block of code which only runs when it is called.
fetchall():
This function will return all the rows from the result set in the form
of a tuple containing the records. fetchone():
This function will return one row from the result set in the form of
a tuple containing the records. commit():
This function provides changes in the database physically.

DETAILED DESCRIPTION

❖ Our project has 3 MySQL tablets. These are:


I. Books
II. Issue
III. Return

Page 8 of 26
1. The table books contain the following columns:

a. bname
b. author
c. bcode
d. total
e. subject

2. The table issue contain the following columns:


a. name
b. regno
c. bcode
d. issue_date

3. The table return contain the following columns:


a. Name
b. regno
c. bcode
d. return_date

SOURCE CODE
For MySQL:
Create database library_app;
Use library_app;
CREATE TABLE BOOKS
(bname varchar(50),
Author varchar(50)
bcode varchar(50)
total int(50) subject
varchar(50))
CREATE TABLE
ISSUE (name
varchar(50), regno
varchar(50), bcode
int(50)
issue_date varchar(50));
CREATE TABLE
RETURN (name
varchar(50), regno
varchar(50), bcode
int(50),
return_date varchar(50));
FOR PYTHON:
Import mysql.connector as a
Con= a.connector(host=’localhost’,user=’root’,password=’
9586’,database=’libarary_app’) def
addbook():
bn=input(“Enter Book Name”)
bn=input(“enter author’s Name:”)
t=int(input(“Total books: ”)) s=input(“Enter
subject: ”)
Page 10 of 26
data=(bn,ba,c,t,s)
sql=,insert into books values( %s,%s,%s,%s,
%s); c=con.cursor() c.execute() con.commit()
print(“\n\n\n\nbook added successfully… ...... \n\n\n\n”)
wait = input(‘\n\n\npress enter to
continue… \n\n\n\n\n\n\n’) main()
def issueb():
n= input(“Enter Student Name:”)
r= int(input(“Enter reg No. : “)
co=int(input(“Enter Book
Code :”) d=input(“Enter Date:”)
a=”insert into issue values(%s,%s,%s,%s,
%s); data=(n,r,co,d) c=con.cursor()
c.execute(a,data)
con.commit()
print(“\n\n\n\nBook issused successfully to : “,n)
wait=input(‘\n\n\nPress enter to
continue… \n\n\n\n\n\n’)
bookup(co,-1)
main()
def dispbook():
a=”select*frombooks,”
c=con.cursor()
c.execute(a)
myresult=c.fetchall() for
i in myresult:
print(“Book Name:
“,i*0+) print(“Author:
“,i*1+) print(“Book
Code: “,i*2+)
print(“Total: “,i*3+)
print(“subject; “,i*4+)
wait=input(‘\n\n\nPress enter to
continue….. \n\n\n\n\n\n\n\n\n\n’)
main()
def report_issued_books();
a=”select*from issue;”
c=con.cursor()
c.execute(a)
myresult=c.fetchall()
for I in myresult:
print(myresult)
wait=input(‘\n\n\nPress enter to
continue….\n\n\n\n\n\n\n\n’) main()
def
report_return_books():
a=”select*from return_;”
c=con.cursor()
c.execute(a)
myresult=c.fetchall()
for i in myresult:
print(myresult)
wait=input(‘\n\n\nPress enter to
continue….\n\n\n\n\n\n\n\n\n\n\n\n’)
main()
def return()
n=input(“Enter student name: “)
r=int(input(“Enter reg no.: “)) co=
int(input(“Enter Book Code: “))
d=input(‘Enter Date: “)
a=”insert into return_values(%s,%s,%s,
%s);” data=(n,r,co,d) c=con.cursor()
c.execute(a,data)
con.commit()
print(“book returned by: “,n) wait=input(‘\n\n\nPress
enter to continue….\n\n\n\n\n’) main()
def bookup(co,u):
a=”select total from books where bcode=%s;
” data = (co,) c=con.cursor()
c.execute(a,data)
myresult=c.fetchone()
t=myresult[0]+u
sql=”update books set total=%s where bcode=%s;”
d=(t,co)
c.execute(sql,d)
con.commit()
wait= input(‘\n\n\nPress enter to continue…..\n\n\n\n\n\n’)
main()
def dbook():
ac=int(input(“enter book code:”))
a=”delete from books where bcode=%s;”
data=(ac,)
c=con.cursor()
c.execute(a,dat)
con.commit()
print(“Book deleted succesfully’) wait=input(‘\
n\n\nPress enter to
continue…..\n\n\n\n\n\n\n\n\n\n\n\n’) main()
def main():
print("""LIBRARY MANAGEMENT APPLICATION
1.ADD BOOK
2. ISSUE OF BOOK
3. RETURN OF BOOK
4. DELETE BOOK
5. DISPLAY BOOKS
6. REPORT MENU
7. EXIT PROGRAM
""") choice=input("enter Task
No: .... ") print('\n\n\n\n\n\n\n')
if(choice=='1'):
addbook()
elif(choice=='2'):
issueb()
elif(choice=='3'):
returnb()
elif(choice=='4'):
dbook()
elif(choice=='5'):
dispbook()
elif(choice=='6'):
print('''REPORT MENU
1.ISSUED BOOKS
2. RETURNED BOOKS
3. GO BACK TO MAIN MENU
\n\n\n
''')
choice=input("Enter Task No: ....
") print('\n\n\n\n\n\n\n') if
choice=='1':
report_issued_books()
elif choice=='2':
report_return_books()
elif choice=='3':
main()
else:
print("Please try again. .... \n\n\n\n\n\n\n\n\n")
main()
elif(choice=='7'):
print('\n\n\n\n\n\n\n\n\n\n\n\nThank you and have a
great day ahead ..... \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n') else:
print("Please try again. ...... \n\n\n\n\n\n\n\n\n\n\n\n")
main()
main()

OUTPUT AND TABLES


➢ OUTPUTS:
1) Add a Book:

Page 17 of 26
2)Issue a Book:

Page 18 of 26
3)Return a Book:
Page 19 of 26

4)Delete a Book:

5)Display books:
Page 20 of 26
Page 21 of 26

6. Report Menu:
Page 22 of 26

7. Exit Program:
Page 23 of 26

➢ TABLES:

1.Select from books


Page 24 of 26

2. Select *from issue:

3. select *from Return_:

Page 25 of 26
BIBLIOGRAPHY:
• www.byjus.com
• www.vedantu.com
• www.wikipidea.com

You might also like