Computer Project ON Library Management
Computer Project ON Library Management
ON
LIBRARY MANAGEMENT
1
INDEX
Sr.No. Content Page.No.
1. Certificate 4
2. Acknowledgement 5
3. Project introduction 6
4. Aim Of Devlopment 7
5. Python(programming 8
language)
6. Hardware and software 10
specification
7. Example Of python program 11-12
11. bibliography 32
CERTIFICATE
2
3
4
ACKNOWLEDGEMENT
NANDANI THANKI
12thCOMMERCE
5
PROJECT INTRODUCTION
6
AIM OF DEVLOPMENT
• The operation of borrowing and
managing inventories becomes paperless.
• To store list of books with their prices.
• To build a monitoring system that is able
to manage all library operations
efficiently.
• To keep a track of information of
borrowed book.
• Give an opportunity to librarians to
reduce mistake due to manual method.
7
PYTHON PROGRAMMING
LANGUAGE-OVERVIEW
Python is an interpreted, object-oriented,
high-level programming language with
dynamic semantics. Its high-level built in
data structures, combined with dynamic
typing and dynamic binding, make it very
attractive for Rapid Application
Development, as well as for use as a
scripting or glue language to connect
existing components together. Python's
simple, easy to learn syntax emphasizes
readability and therefore reduces the cost
of program maintenance. Python supports
modules and packages, which
encourages program modularity and code
reuse.
The Python interpreter and the extensive
standard library are available in source or
binary form without charge for all major
platforms, and can be freely distributed.
8
Python interpreters are available for many
operating systems. A global community of
programmers develops and maintains
CPython, a free and opensource
reference implementation. A nonprofit
organization, the Python Software
Foundation, manages and directs
resources for Python and CPython
development.
9
HARDWARE AND SOFTWARE
SPECIFICATION
HARDWARE SPECIFICATION:
Processor: INTEL(R) CORE(TM)
Installed RAM: 8 GB
SOFTWARE SPECIFICATIONS:
Windows Edition : Windows 10 pro
Python : IDLE(Python 3.8 64 bit)
SQL: My SQL 5.5 Command line prompt
10
EXAMPLE OF PYTHON
PROGRAMMING
Python Program to Display the
multiplication Table
SOURCE CODE:
11
# Multiplication table (from 1 to 10) in Python
num = 12
12
MySQL-OVERVIEW
MySQL is a free, open-source database
engine available for all major platforms.
(Technically, MySQL is a relational
database management system (RDBMS).)
MySQL represents an excellent
introduction to modern database
technology, as well as being a reliable
mainstream database resource for
highvolume applications.
A modern database is an efficient way to
organize, and gain access to, large
amounts of data. A relational database is
able to create relationships between
individual database elements, to organize
data at a higher level than a simple table
of records, avoid data redundancy and
enforce relationships that define how the
database functions.
MySQL is written in C and C++. Its SQL
parser is written in yacc, but it uses a
home-brewed lexical analyzer. MySQL
13
works on many system platforms,
including AIX, BSDi, FreeBSD, HPUX,
ArcaOS, eComStation, i5/OS, IRIX, m
acOS, Microsoft Windows, NetBSD, Novel
NetWare, OpenBSD, OpenSolaris, OS/2
Warp, QNX, Oracle
Solaris, Symbian, SunOS, SCO
OpenServer, SCO UnixWare, Sanos
and Tru64. A port of MySQL to
OpenVMS also exists.
14
SCREENSHOTS
15
16
17
OUTPUTS:
18
19
20
PROGRAM CODING
21
s="insert into register_user
(user_id,name) values(%s,%s)"
data=(phone_no,name)
cursor.execute(s,data) mycon.commit()
print("You have registered successfully !!")
break elif choice==2:
phone_no=input("enter your registered
phone number : ")
break else:
print("Enter your choice again :")
22
book_name,category,price from the_library")
result=cursor.fetchall() for row in result:
print(row)
elif ch==2:
print("We have following category of books in
our libraray : ")
importmysql.connector as sqltor
mycon=sqltor.connect(host="localhost",user="
root",password="root",database="the_cerebru
m") cursor=mycon.cursor()
cursor.execute("select DISTINCT
category from the_library")
result=cursor.fetchall() for row in result:
print(row)
23
choice=input("Enter the category of your
choice in small letters: ") if
choice=='physics':
print("We have following books for physics :
")
cursor.execute("select
book_id,book_name,price from the_library
where category = 'physics' ")
result=cursor.fetchall() for row in result:
print(row)
elif choice=='chemistry':
print("We have following books for chemistry
: ")
cursor.execute("select
book_id,book_name,price from the_library
where category = 'chemistry' ")
result=cursor.fetchall() for row in result:
print(row)
24
elif choice=='maths': print("We have
following books for maths : ")
cursor.execute("select
book_id,book_name,price from the_library
where category = 'maths' ")
result=cursor.fetchall() for row in result:
print(row)
elif choice=='commerce':
print("We have following books for commerce
: ")
cursor.execute("select
book_id,book_name,price from the_library
where category = 'commerce' ")
result=cursor.fetchall() for row in result:
print(row)
25
elif choice=='novel': print("We have
following books for novel : ")
cursor.execute("select
book_id,book_name,price from the_library
where category = 'novel' ")
result=cursor.fetchall() for row in result:
print(row)
else:
print("SORRY! you have entered wrong
category.") break
importmysql.connector as sqltor
mycon=sqltor.connect(host="localhost",user="
root",password="root",database="the_cerebru
m")
cursor=mycon.cursor(buffered=True)
26
a=input("Enter the book_id of book you
want to issue:")
if enquire==None:
cursor.execute("update the_library set
user_id='"+phone_no+"'"+" ,
issue_date=curdate()
,return_date=Date_Add(curdate(),interval 7
day) where book_id='"+a+"'")
mycon.commit() print("You have issued
the book successfully!")
else:
print("SORRY! the book has been issued
by someone else.")
27
elif ch==3:
cost_per_day = 50
b=input("Enter the book_id of book you want
to return:") cursor.execute("select return_date
from the_library where book_id='"+b+"'")
myresult = cursor.fetchall() for x in
myresult : f_date=str(x[0]) l_date =
date.today().strftime("%Y-%m-%d")
a1 = f_date.split('-')
a2 = l_date.split('-')
date1 =
date(int(a1[0]),int(a1[1]),int(a1[2]))
date2 =
date(int(a2[0]),int(a2[1]),int(a2[2]))
delta = (date2-date1).days if
delta<=0:
28
cursor.execute("update the_library set
user_id=NULL,issue_date=NULL,return_date
=NULL where book_id='"+b+"'")
mycon.commit() print("book
returned succesfully !!")
else:
print("You need to pay : ",delta*50 ,
"rupees") print("YOU have been
charged a penalty of",delta*50," RUPEES
for late return") cursor.execute("update
the_library set
user_id=NULL,issue_date=NULL,return_d
ate
=NULL where book_id='"+b+"'")
mycon.commit() print("book
returned succesfully !!")
elif ch==4:
29
print("You have exit our library")
print("--------- THANK YOU! PLEASE
VISIT AGAIN ---------")
break else:
print("Please enter your choice again.")
30
BIBLIOGRAPHY
1.www.google.com
2.https://www.wikipedia.org/
3.www.youtube.com
4.Computer Science with Python(author:
SumitaArora)
---------------------------x---------------------------
31