0% found this document useful (0 votes)
20 views46 pages

Combinepdf

combination is the mixtyre of two or more

Uploaded by

blackrevenger27
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)
20 views46 pages

Combinepdf

combination is the mixtyre of two or more

Uploaded by

blackrevenger27
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/ 46

ST JOSEPHS HIGH

SCHOOL
LIBRARY MANAGEMENT
INFORMATICS PRACTICES PROJECT

SUBMITTED TO : Mr. MANISH KUMAR

NAME : ANKIT BHASKAR


CLASS : XII ‘A’
CLASS ROLL NO-05
BOARD ROLL NO
CERTIFICATE
WE CERTIFY THAT WORK EMBODIEDIN THE
PRESENT IS THE STUDENTS(DETAILS ARE GIVEN
BELOW) OWNWORK AND THAT IT WAS
CARRIEDOUT UNDER OUR SUPERVISION.

NAME : ANKIT BHASKAR


CLASS : XII ‘A’
CLASS ROLL NO :05
SESSION 2024-25
WE ALSO CERTIFY THAT THE WORK WAS DONE
ATCHEMICAL LABORATORY OF ST. JOSEPH’S
HIGHSCHOOL, PATNA.

SIGNATURE OF TEACHER
ACKNOWLWDGEMENT
I EXPRESS MY DEEP SENSE OF
GRATITUDEAND REGARD TO MY
TEACHER MR.BASANTKUMAR FOR
CONSTANT GUIDANCE
ANDSUPERVISON DURING THE
PERIOD OF MYPROJECT WORK
WHICH MADE IT POSSIBLEFOR ME TO
COMPLETE THIS PROJECT. IWOULD
ALSO LIKE TO RECORD MYSINCERELY
THANKS TO MY PARENTS
WHOSECONSTANT
ENCOURAGEMENT HELPED MEIN
COMPLETING THIS PROJECT.

SIGNATURE OF CANDIDATE
CONTENTS

➢ About the Project


➢ System Implementation
➢ Introduction
➢ Database Structure
➢ Menu
➢ Insert Record
➢ Update Record
➢ Delete Record
➢ Display Record using iLoc and Loc
➢ Analyse Record using iterrows()
➢ Analyse Record using iteritems()
➢ Analyse Record using itertuples()
➢ Analyse Record using aggregate function
➢ Graphical Represent using Plot() Function
➢ Graphical Represent using Bar() Function
➢ Conclusion
➢ Bibliography
ABOUT THE PROJECT

The project titled "Library Management System" is


management software for monitor and controlling the book
details in the organization. The project is designed and
coded in Jupyter Notebook (Python 3.0x) & database
management is handled by MySQL.

This software mainly focuses on basic operations in a


library like adding new book details, updating & deleting
book details, analysing the details with various tools, giving
pictorial representation of book details etc.

"Library Management System" is written in Python 3.0x


(Jupyter Notebook) on 64 bit windows operating system
designed to help users to manage book details. This
software is easy to use for both beginners and advanced
users.
SYSTEM IMPLEMENTATION

1. Hardware Used

➢ Manufacturer : Lenovo Group Limited


➢ Model : Lenovo ThinkCentre M71E
➢ Categories : Desktop
➢ Processor : Intel® Core™ i3-2120

CPU @ 3.30 GHz

➢ Installed Memory : 4.00 GB


➢ System Type : 64-bit Operating System,

x64 based Processor

2. Software Used

➢ Windows 7 Professional
➢ Jupyter Notebook (Python 3.0x)
➢ MySQL
➢ Microsoft Word
INTRODUCTION

What is Python Programming Language?


Python is an interpreted, high-level and general-purpose programming
language. Python's design philosophy emphasizes code readability with
its notable use of significant whitespace. Its language constructs and
object-oriented approach aim to help programmers write clear, logical
code for small and large-scale projects.

Python is dynamically-typed and garbage-collected. It supports


multiple programming paradigms, including structured (particularly,
procedural), object-oriented and functional programming. Python is
often described as a "batteries included" language due to its
comprehensive standard library.

What is PANDAS?

In computer programming, pandas is a software library written for the


Python programming language for data manipulation and analysis. In
particular, it offers data structures and operations for manipulating
numerical tables and time series.

It is free software released under the three-clause BSD license. The


name is derived from the term "panel data", an econometrics term for
data sets that include observations over multiple time periods for the
same individuals. Its name is a play on the phrase "Python data
analysis" itself.
What is MATPLOTLIB?

Matplotlib is a comprehensive library for creating static, animated, and


interactive visualizations in Python. Matplotlib makes easy things
easy and hard things possible. We can create and develop publication
quality plots with just a few lines of code.

Matplotlib is a plotting library for the Python programming language


and its numerical mathematics extension NumPy. It provides an object-
oriented API for embedding plots into applications using general-
purpose GUI toolkits.

What is MySQL?

MySQL is an open-source relational database management system


(RDBMS) which organizes data into one or more data tables in which
data types may be related to each other; these relations help structure
the data.

SQL is a language programmers use to create, modify and extract data


from the relational database, as well as control user access to the
database.

In addition to relational databases and SQL, an RDBMS like MySQL


works with an operating system to implement a relational database in a
computer's storage system, manages users, allows for network access
and facilitates testing database integrity and creation of backups.
DATABASE STRUCTURE
Database : School
Table : Library
MENU
import mysql.connector as sqltor
import pandas as pd
import matplotlib.pyplot as plt
con = sqltor.connect(host = 'localhost',
user = 'root', passwd = 'sjhs', database =
'school', charset = 'utf8')
if(con.is_connected()):
print("Connection Successful")
else:
print("Connection Not Successful")
print("Menu")
print("1. To insert Book Record")
print("2. To update Book Record")
print("3. To delete Book Record")
print("4. To display Book Record using Loc
and iLoc Function")
print("5. To analyse Book Record using
iterrows function")
print("6. To analyse Book Record using
iteritems function")
print("7. To analyse Book Record using
itertuples function")
print("8. To analyse Book Record using
Aggregate function")
print("9. To present graphical
representation using plot function")
print("10. To present graphical
representation using bar function")
ch = int(input("Enter Choice"))
OUTPUT:-
INSERT RECORD
if(ch==1):
option = 'Y'
while(option == 'Y'):
cursor = con.cursor()
Bookno = int(input("Enter Book Number"))
BName = input("Enter Book Name")
Subject = input("Enter Subject Name")
Purchase = input("Enter Purchase date in
YYYY-MM-DD Format")
Price = float(input("Enter Price"))
Tax = float(input("Enter Tax Charges"))
Category = int(input("Enter Category
Number"))
str = "Insert into Library(Bookno,
BName, Subject, Purchase, Price,
Tax, Category) values({}, '{}',
'{}', '{}', {}, {},
{})".format(Bookno, BName,
Subject, Purchase, Price, Tax,
Category)
cursor.execute(str)
con.commit()
print('Do you like to continue to insert
the record')
option = input("Enter Y or N")
OUTPUT:-
UPDATE RECORD
elif(ch==2):
cursor = con.cursor()
Bookno = int(input("Enter Book Number"))
BName = input("Enter Book Name")
Subject = input("Enter Subject Name")
Purchase = input("Enter Purchase date in
YYYY-MM-DD Format")
Price = float(input("Enter Price"))
Tax = float(input("Enter Tax Charges"))
Category = int(input("Enter Category
Number"))
str = "Update Library set BName = '{}',
Subject = '{}', Purchase = '{}',
Price = {}, Tax = {}, Category =
{} where Bookno =
{}".format(BName, Subject,
Purchase, Price, Tax, Category,
Bookno)
cursor.execute(str)
con.commit()
str = "Select * from Library;"
cursor.execute(str)
data = cursor.fetchall()
df = pd.DataFrame(data, columns = ['Bookno',
'BName', 'Subject', 'Purchase',
'Price', 'Tax', 'Category'])
print(df)
OUTPUT:-
DELETE RECORD
elif(ch==3):
cursor = con.cursor()
Bookno = int(input("Enter Book Number"))
str = "Delete from Library where Bookno =
{}".format(Bookno)
cursor.execute(str)
con.commit()
str = "Select * from Library;"
cursor.execute(str)
data = cursor.fetchall()
df = pd.DataFrame(data, columns = ['Bookno',
'BName', 'Subject', 'Purchase',
'Price', 'Tax', 'Category'])
print(df)
OUTPUT:-
DISPLAY RECORD USING
LOC AND iLOC
elif(ch==4):
cursor = con.cursor()
str = "Select * from Library;"
cursor.execute(str)
data = cursor.fetchall()
df = pd.DataFrame(data, columns = ['Bookno',
'BName', 'Subject', 'Purchase',
'Price', 'Tax', 'Category'])
print(df)
print(df.iloc[1:4, 0:2])
print(df.iloc[2:5, 1:3])
print(df.iloc[3:, 2:])
print(df.loc[0:2, 'BName':'Price'])
print(df.loc[1:2, 'BName':'Purchase'])
print(df.loc[2:4, 'Bookno':'BName'])
OUTPUT:-
ANALYSE RECORD USING
ITERROWS()

elif(ch==5):
cursor = con.cursor()
str = "Select * from Library;"
cursor.execute(str)
data = cursor.fetchall()
df = pd.DataFrame(data, columns = ['Bookno',
'BName', 'Subject', 'Purchase',
'Price', 'Tax', 'Category'])
print(df)
for index, row in df.iterrows():
print(index, row)
OUTPUT:-
0 Bookno 8001
BName Harry Potter
Subject Story
Purchase 2018-09-03
Price 1500.00
Tax 240.00
Category 20

Name: 0, dtype: object


1 Bookno 8002
BName C++
Subject Programming
Purchase 2020-09-08
Price 750.00
Tax 100.00
Category 10
Name: 1, dtype: object

2 Bookno 8004
BName Architecture
Subject Computer
Purchase 2019-04-20
Price 550.00
Tax 50.00
Category 20
Name: 2, dtype: object

3 Bookno 8005
BName HTML
Subject Computer
Purchase 2018-04-04
Price 600.00
Tax 70.00
Category 20
Name: 3, dtype: object
4 Bookno 8006
BName Java
Subject Programming
Purchase 2018-05-06
Price 750.00
Tax 20.00
Category 10
Name: 4, dtype: object

5 Bookno 8007
BName DS
Subject Computer
Purchase 2020-06-02
Price 850.00
Tax 65.00
Category 20
Name: 5, dtype: object

6 Bookno 8008
BName Jurrasic Park
Subject Horror
Purchase 2020-06-09
Price 650.00
Tax 76.00
Category 40
Name: 6, dtype: object

7 Bookno 8009
BName Algebra
Subject Maths
Purchase 2018-09-30
Price 850.00
Tax 54.00
Category 60
Name: 7, dtype: object
8 Bookno 8010
BName Matrices
Subject Maths
Purchase 2020-09-08
Price 750.00
Tax 54.00
Category 60
Name: 8, dtype: object

9 Bookno 8012
BName Ancient India
Subject History
Purchase 2019-07-05
Price 950.00
Tax 100.00
Category 50
Name: 9, dtype: object
ANALYSE RECORD USING
ITERITEMS()
elif(ch==6):
cursor = con.cursor()
str = "Select * from Library;"
cursor.execute(str)
data = cursor.fetchall()
df = pd.DataFrame(data, columns = ['Bookno',
'BName', 'Subject', 'Purchase',
'Price', 'Tax', 'Category'])
print(df)
for index, col in df.iteritems():
print(index, col)
OUTPUT:-
Bookno 0 8001
1 8002
2 8004
3 8005
4 8006
5 8007
6 8008
7 8009
8 8010
9 8012
Name: Bookno, dtype: int64

BName 0 Harry Potter


1 C++
2 Architecture
3 HTML
4 Java
5 DS
6 Jurrasic Park
7 Algebra
8 Matrices
9 Ancient India
Name: BName, dtype: object

Subject 0 Story
1 Programming
2 Computer
3 Computer
4 Programming
5 Computer
6 Horror
7 Maths
8 Maths
9 History
Name: Subject, dtype: object
Purchase 0 2018-09-03
1 2020-09-08
2 2019-04-20
3 2018-04-04
4 2018-05-06
5 2020-06-02
6 2020-06-09
7 2018-09-30
8 2020-09-08
9 2019-07-05
Name: Purchase, dtype: object

Price 0 1500.00
1 750.00
2 550.00
3 600.00
4 750.00
5 850.00
6 650.00
7 850.00
8 750.00
9 950.00
Name: Price, dtype: object

Tax 0 240.00
1 100.00
2 50.00
3 70.00
4 20.00
5 65.00
6 76.00
7 54.00
8 54.00
9 100.00
Name: Tax, dtype: object
Category 0 20
1 10
2 20
3 20
4 10
5 20
6 40
7 60
8 60
9 50
Name: Category, dtype: int64
ANALYSE RECORD USING
ITERITUPLES()

elif(ch==7):
cursor = con.cursor()
str = "Select * from Library;"
cursor.execute(str)
data = cursor.fetchall()
df = pd.DataFrame(data, columns = ['Bookno',
'BName', 'Subject', 'Purchase',
'Price', 'Tax', 'Category'])
print(df)
for row in df.itertuples():
print(row)
OUTPUT:-
Pandas(Index=0, Bookno=8001, BName='Harry
Potter', Subject='Story',
Purchase=datetime.date(2018, 9, 3),
Price=Decimal('1500.00'),
Tax=Decimal('240.00'), Category=20)

Pandas(Index=1, Bookno=8002, BName='C++',


Subject='Programming',
Purchase=datetime.date(2020, 9, 8),
Price=Decimal('750.00'), Tax=Decimal('100.00'),
Category=10)

Pandas(Index=2, Bookno=8004,
BName='Architecture', Subject='Computer',
Purchase=datetime.date(2019, 4, 20),
Price=Decimal('550.00'), Tax=Decimal('50.00'),
Category=20)

Pandas(Index=3, Bookno=8005, BName='HTML',


Subject='Computer',
Purchase=datetime.date(2018, 4, 4),
Price=Decimal('600.00'), Tax=Decimal('70.00'),
Category=20)

Pandas(Index=4, Bookno=8006, BName='Java',


Subject='Programming',
Purchase=datetime.date(2018, 5, 6),
Price=Decimal('750.00'), Tax=Decimal('20.00'),
Category=10)

Pandas(Index=5, Bookno=8007, BName='DS',


Subject='Computer',
Purchase=datetime.date(2020, 6, 2),
Price=Decimal('850.00'), Tax=Decimal('65.00'),
Category=20)
Pandas(Index=6, Bookno=8008, BName='Jurrasic
Park', Subject='Horror',
Purchase=datetime.date(2020, 6, 9),
Price=Decimal('650.00'), Tax=Decimal('76.00'),
Category=40)

Pandas(Index=7, Bookno=8009, BName='Algebra',


Subject='Maths', Purchase=datetime.date(2018,
9, 30), Price=Decimal('850.00'),
Tax=Decimal('54.00'), Category=60)

Pandas(Index=8, Bookno=8010, BName='Matrices',


Subject='Maths', Purchase=datetime.date(2020,
9, 8), Price=Decimal('750.00'),
Tax=Decimal('54.00'), Category=60)

Pandas(Index=9, Bookno=8012, BName='Ancient


India', Subject='History',
Purchase=datetime.date(2019, 7, 5),
Price=Decimal('950.00'), Tax=Decimal('100.00'),
Category=50)
ANALYSE RECORD USING
AGGREGATE FUNCTION
elif(ch==8):
cursor = con.cursor()
str = "Select * from Library;"
cursor.execute(str)
data = cursor.fetchall()
df = pd.DataFrame(data, columns = ['Bookno',
'BName', 'Subject', 'Purchase',
'Price', 'Tax', 'Category'])
print(df)
print(df.max(axis=0))
print(df.max(axis=1))
print(df.min(axis=0))
print(df.min(axis=1))
OUTPUT:-
Bookno 8012
BName Matrices
Subject Story
Purchase 2020-09-08
Price 1500.00
Tax 240.00
Category 60
dtype: object

0 8001
1 8002
2 8004
3 8005
4 8006
5 8007
6 8008
7 8009
8 8010
9 8012
dtype: int64

Bookno 8001
BName Algebra
Subject Computer
Purchase 2018-04-04
Price 550.00
Tax 20.00
Category 10
dtype: object
0 20
1 10
2 20
3 20
4 10
5 20
6 40
7 60
8 60
9 50
dtype: int64
GRAPHICAL
REPRESENTATION USING
PLOT() FUNCTION
elif(ch==9):
cursor = con.cursor()
str = "Select * from Library;"
cursor.execute(str)
data = cursor.fetchall()
df = pd.DataFrame(data, columns = ['Bookno',
'BName', 'Subject', 'Purchase',
'Price', 'Tax', 'Category'])
print(df)
plt.plot(df.BName, df.Price)
plt.xlabel("Book Name")
plt.ylabel("Book Price")
plt.title("Book Table")
OUTPUT:-
GRAPHICAL
REPRESENTATION USING
BAR() FUNCTION
elif(ch==10):
cursor = con.cursor()
str = "Select * from Library;"
cursor.execute(str)
data = cursor.fetchall()
df = pd.DataFrame(data, columns = ['Bookno',
'BName', 'Subject', 'Purchase',
'Price', 'Tax', 'Category'])
print(df)
plt.bar(df.BName, df.Price)
plt.xlabel("Book Name")
plt.ylabel("Book Price")
plt.title("Book Table")
else:
print("Invalid")
OUTPUT:-
CONCLUSION

"Library Management System" has been prepared to

reduce manual work and with the help of this application

program, the system was able to process and update

database with more ease.

Because records can stored in fast manner, any record can

be easily accessed by the beginners and advanced users.

To save the cost and time & also to record every transaction

in computerized system to reduce the paper work.


BIBLIOGRAPHY

➢ Sumita Arora Class – XII

➢ Python Forum

➢ MySQL Forum

➢ cbse.nic.in

➢ wikipedia.com

➢ google.com

➢ youtube.com

You might also like