0% found this document useful (0 votes)
185 views26 pages

Shankar XXX

The document outlines a Library Management System project that utilizes Python and MySQL for its development. It includes sections on acknowledgments, introductions to Python and MySQL, project objectives, system requirements, coding examples, and outputs. The project aims to enhance library operations with features such as user logins, online notice boards, and report generation.

Uploaded by

andersonisidorer
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)
185 views26 pages

Shankar XXX

The document outlines a Library Management System project that utilizes Python and MySQL for its development. It includes sections on acknowledgments, introductions to Python and MySQL, project objectives, system requirements, coding examples, and outputs. The project aims to enhance library operations with features such as user logins, online notice boards, and report generation.

Uploaded by

andersonisidorer
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/ 26

Library Management

1
SNO TOPIC Page.no

1. ACKNOWLEDGEMENT 4

2. Introduction of Python 5

3. Introduction of MYSQL 8

4. Introduction of Project 10

5. Theory 11

6. System requirement 12

2
7. Coding 13

8. Output 14

9. Biblography 22

3
ACKNOWLEDGMENT

The successful completion of any task would be incomplete without


mentioning the names of those people who helped to make it possible. I take
this opportunity to acknowledge my deep senses of gratitude to my
computer science teacher MRs.
Sonia Choudhary for his valuable support, constant help and guidance at
every stage without which this project would not have come forth.

I also register my sense of gratitude to my parents for their immense


encouragement and support. I would also like to thank my friends for
encouraging me during the course of this project.

4
INTRODUCTION TO PYTHON

Python is an interpreted language, 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 and easy to learn syntax emphasizes readability and
therefore reduces the cost of program maintenance Python supports module
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.

Python is a computer programming language often used to build


Websites, software, automate tasks and conduct data analysis.
Python is a general-purpose language, meaning it can be used to create
a variety of different programs and isn’t specialized for any specific
problems

5
6
HISTORY OF PYTHON

Python is a widely used general-purpose, high-level

Programming language. It was initially designed by

Guido van Rossum in 1991 and developed by python

Software foundation. It was mainly developed for Emphasis on code

readability, and its syntax allows Programmers to express concept in

fewer lines

7
INTRODUCTION TO MYSQL

MySQL is a relational database management system (RDBMS)


developed by oracle that is based on structured query language (SQL)

A database is a structured collection of data. It may be anything from a


simple shopping list to a picture gallery or a place to hold the vast
amounts of information in a corporate network. In particular, a
relational database is a digital store collecting data and organising it
according to relational model.
In this model, tables consist of rows and columns, and relationships
between data elements all follow a strict logical structure. An RDBMS
is simply the set of software tools used to actually implement, manage,
and query such a database

To add, access, and process data stored in a computer database you


need a database management system such as
MYSQL server. Since computers are very good at handling large
amounts of data, database management system plays a central role in
computing.

8
9
INTRODUCTION TO PROJECT

Library management system is a project which aims in developing a


computerized system to maintain all
the daily work of library .This project has many features which are
generally not available in normal library management systems like
facility of user login and a
facility of teachers login .It also has a facility of admin login through
which the admin can monitor the whole system .It also has facility of an
online notice board where teachers can student can put up information
about
workshops or seminars being held in our colleges
or nearby colleges and librarian after proper verification from the
concerned institution organizing the seminar can add it to the notice board .
It has also a facility where student after logging in their accounts can see
list of books issued and its issue date and return date and also the students
can request the librarian to add new books by
filling the book request form. The librarian after logging into his account
i.e. admin account can generate various reports such as student report,
issue report,
teacher report and book report.

10
THEORY

IMPORT MYSQL.CONNECTOR

MYDB= MYSQL.CONNECTOR. CONNECT ( HOST=

“LOCALHOST”
USER= “ROOT”
PASSWORD= “YOUR PASSWORD”)

 CREATING AN INSTANCE OF CURSOR CLASS


 WHICH IS USED TO EXECUTE THE SQL
 STATEMENTS IN PYTHON
CURSOR= MYDD.CURSOR()
 CREATING A DATABASE WITH NAME
 ‘GEEKSFORGEEKS’ EXECUTE () METHOD
 IS USED TO COMPILE A SQL STATEMENT
 BELOW STATEMENT IS USED TO CREATE
 THE ‘GEEKSFORGEEKS’ DATABASE

CURSOR.EXECUTE(“CREATE DATABASE LIBRARY”)

11
SYSYTEM REQUIREMENTS

HARDWARE REQUIREMENTS

 Printer- to print required documents of project


 Compact drive
 Processor: Pentium III and above
 RAM: 256 MB (min.)
 Hard Disk: 20 GB (min.)

SOFTWARE REQUIREMENTS

 Windows 7 or higher
 MySQL server 5.5 or higher
 Python idle 3.6 or higher

Microsoft Word 2010 or higher for documentation

12
CODING

Coding for MySQL

CREATE DATABASE
LIBRARY; USE LIBRARY;

create table books (b name varchar (50), b code varchar (10), total
int, subject varchar (50));

create table issue (name varchar (50), regno varchar (10), b code int,
issue varchar (50));

create table submit (name varchar (50), regno varchar (10), b code int,
submit varchar (50));

13
Coding for python

def add book ():


bn=input ("enter Book name:")
c=input ("enter Book code:") t=input
("Total books:") s=input ("enter
subject:") data= (bn, c, t, s)
sql ='insert into books values (%s, %s, %s, %s)' c= my con.
Cursor ()
c. execute (sql, data) my con.
commit ()
print ("> <")
print ("Data entered Successfully") main ()

14
def issue b ():
n=input ("enter name:") r=input

("enter Reg No:") co=input ("enter

Book code:") d=input ("enter date:")

a="insert into issue values (%s, %s, %s, %s)" data= (n, r,

cod)

c=my con. cursor ()

c.execute (a, data) my

con. commit ()

print ("> <")

print ("Book issued to:", n) book


up (co, -1)

15
def book up (co, u):

a="select TOTAL from books where BCODE=%s" data=(co,)

c=my con. cursor ()

c.execute (a, data)

my result= c. fetchone () t=

my result [0] + u

sql="update books set TOTAL=%s where BCODE=%s" d= (t, co)

c.execute (sql, d) my

con. commit () main ()

16
def d book ():

ac=input ("enter Book Code:")

a="delete from books where BCODE=%s" data=(ac,)

c=my con. cursor ()

c. execute(a, data) my

con. commit () main ()

17
def disp book ():

a="select*from books" c=my

con. cursor ()

c.execute(a) myresult= c.

fetchall () for i in myresult:

print ("Book name:", I [0])

print ("Book code:", I [1])

print ("Total:", I [2])

print ("Subject:", I [3])

print ("> <")

main ()

18
def main ():
print (""""

LIBRARY MANAGER

1. ADD BOOK

2. ISSUE BOOK

3. SUBMIT BOOK

4. DELETE BOOK

5. DISPLAY BOOKS
""")

19
choice=input ("enter Task No:") print
("> <")
if(choice=='1'):
addbook()
elif(choice=='2'):
issueb()
elif(choice=='3'):
submitb()
elif (choice=='4'):
dbook ()
elif (choice=='5'):
disp book ()
else:
print ("Wrong choice..........................")
main ()

20
def pswd ():

ps=input ("Enter password:") if

ps=="py143":

main ()

else:
print ("Wrong password") pswd ()

pswd()

21
OUTPUTS

 Add a book

 Issue a book

22
 Submission of book

23
TABLES

 Select * from books

 Select * from issue

24
 Select * from submit

 Deletion on table books

25
BIBLIOGRAPHY

 www.google.com

 www.youtube.com

 www.geeksforgeeks.org

 Computer science with python- Sumita Arora

26

You might also like