0% found this document useful (0 votes)
17 views35 pages

Informatics Practices Project Class 12 Final Project

This contains a sample pdf of class 12 informatics practices and this serves with ideas and example to make the project

Uploaded by

yowan raja
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)
17 views35 pages

Informatics Practices Project Class 12 Final Project

This contains a sample pdf of class 12 informatics practices and this serves with ideas and example to make the project

Uploaded by

yowan raja
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

Project name March 2022

A PROJECT REPORT
ON
Library Management
FOR
AISSCE 2022 EXAMINATION
As a part of the Informatics Practices Course (065)

SUBMITTED BY:

Name of the Student Hall ticket Number


18610615

18610571

1) Name Sai Kiran S


2) Name Hruday

Under the guidance of

Mr.SivaPrasad G

PGT in Informatics Practices

DEPARTMENT OF INFORMATICS PRACTICES

Page 1
Project name March 2022

SRI CHAITANYA TECHNO SCHOOL


Kothanur Dinne Main Road, Near Bus Stop 8th Phase, JP Nagar, Jumbo Sawari, Dinne,
Bengaluru, Karnataka 560078

CERTIFICATE
This is to certify that the Project / Dissertation entitled Library Management is a bonafide
work done by Mr. Sai Kiran S of class XII in partial fulfillment of CBSE’s AISSCE Examination
2021-22 and has been carried out under my direct supervision and guidance. This report or a
similar report on the topic has not been submitted for any other examination and does not form a
part of any other course undergone by the candidate.

Signature of Student Signature of Teacher/Guide


Name: Sai Kiran S. Name: SivaPrasad G
Roll No. 18610615 Designation: PGT in IP

Signature of Principal
Name:
Place: JP Nagar

Date:23 Feb 2022.

ACKNOWLEDGEMENT

I would like thank the institution for giving the


opportunity to encase and display our talent through
this project.

Page 2
Project name March 2022

I would like to thank my Informatics Practices


teacher Mr.SivaPrasad G for having the patience to
guide me at every step in the project
I am also grateful to the CBSE BOARD for
challenging and giving us this project in which we all
were so engrossed.
I would also like to thank my parents and friends who
helped me in getting the right information for this
project.

TABLE OF CONTENTS

Sl.no Topic Name Page No


1. Abstract
2. System requirements
3. Database design
4. Coding

5. Output screens

6. Bibliography

Page 3
Project name March 2022

ABSTRACT

Page 4
Project name March 2022

.
SYSTEM REQUIREMENTS

Hardware Components
1. VGA Monitor
2. Qwerty keyboard
3. 2GB RAM
4. 2.6 GHz Processor 5. Graphics card
Software Components
1. Windows 7
2. Python 3.7 with suitable modules
3. MySQL Command Client

Page 5
Project name March 2022

DATABASE DESIGN
In the following “book”, we will store the credentials of
database books.

In the following “member”, we will store the details of all


members

In the following “returns”, we will store the details of all


returns

Page 6
Project name March 2022

In the following “issue”, we will store the details of all


issue.

Page 7
Project name March 2022

CODING
import mysql.connector as sqlt
import pandas as pd
from tabulate import tabulate
import matplotlib.pyplot as plt
con = sqlt.connect(host = "localhost", user = "root",
passwd = "saikiran", database = "library")
cursor = con.cursor()
def book_input():
try:
bookid=input("Enter Book Id")
bname = input("Enter Book Name")
author = input("Enter Author Name")
price = float(input("Enter Price"))
copies = int(input("Enter No of Copies"))
qry = "insert into book values({},'{}','{}',{},{},
{});".format(bookid,bname, author,price,copies,copies)
cursor.execute(qry)
con.commit()
Page 8
Project name March 2022

print("added successfully..")
except:
print("Error...Wrong Entry!!!")

def book_edit():
x=int(input("Enter Book ID"))
qry="select * from book where bookid = {};".format(x)
cursor.execute(qry)
r=cursor.fetchone()
if r:
y=float(input("Enter Book ID"))
qry= "update book set price = {} where bookid =
{};".format(y,x)
cursor.execute(qry)
con.commit()
print("Edited Successfully")

else:
print("Wrong Book ID")

Page 9
Project name March 2022

def book_delete():
x=int(input("Enter Book ID"))
qry="select * from book where bookid = {};".format(x)
cursor.execute(qry)
r=cursor.fetchone()
if r:
qry= "delete from book where bookid = {};".format(x)
cursor.execute(qry)
con.commit()
print("deleted Successfully")

else:
print("Wrong Book ID")
def book_search():
x=int(input("Enter Book ID"))
qry="select * from book where bookid = {};".format(x)
cursor.execute(qry)
r=cursor.fetchone()
if r:

Page 10
Project name March 2022

df = pd.read_sql(qry,con)
print(tabulate(df, headers = 'keys' , tablefmt = 'psql',
showindex = False))

else:
print("Wrong Book ID")
def member_input():
try:
memberid=int(input("Enter Member Id"))
mname = input("Enter Member Name")
madd = input("Enter Member Address")
phone = input("Enter Phone No")

qry = "insert into member


values({},'{}','{}','{}');".format(memberid, mname, madd,
phone)
cursor.execute(qry)
con.commit()
print("Added successfully..")

Page 11
Project name March 2022

except:
print("Error !!!")

def member_edit():
x=int(input("Enter Member ID"))
qry="select * from member where memberid =
{};".format(x)
cursor.execute(qry)
r=cursor.fetchone()
if r:
y=input("Enter New Address")
qry= "update member set madd = '{}' where
memberid = {};".format(y,x)
cursor.execute(qry)
con.commit()
print("Edited Successfully.")

else:
print("Wrong Member ID")

Page 12
Project name March 2022

def member_delete():
x=int(input("Enter Member ID"))
qry="select * from member where memberid =
{};".format(x)
cursor.execute(qry)
r=cursor.fetchone()
if r:
qry= "delete from member where memberid =
{};".format(x)
cursor.execute(qry)
con.commit()
print("deleted Successfully")

else:
print("Wrong Member ID")

def member_search():
x=int(input("Enter Member ID"))
qry="select * from member where memberid =
{};".format(x)

Page 13
Project name March 2022

cursor.execute(qry)
r=cursor.fetchone()
if r:

df = pd.read_sql(qry,con)
print(tabulate(df, headers = 'keys' , tablefmt = 'psql',
showindex = False))

else:
print("Wrong Member ID")

def book_output():
df = pd.read_sql("select * from book",con)
print(tabulate(df, headers = 'keys', tablefmt = 'psql',
showindex = False))

def member_output():
df = pd.read_sql("select * from member",con)
print(tabulate(df, headers = 'keys', tablefmt = 'psql',
showindex = False))

Page 14
Project name March 2022

def return_output():
df = pd.read_sql("select * from returns",con)
print(tabulate(df, headers = 'keys', tablefmt = 'psql',
showindex = False))

def issue_output():
df = pd.read_sql("select * from issue",con)
print(tabulate(df, headers = 'keys', tablefmt = 'psql',
showindex = False))
def book_issue():
q = "select max(issueid) from issue;"
cursor.execute(q)
r = cursor.fetchone()[0]
if r:
issueid = r+1
else:
issueid = 1
x=int(input("Enter member ID"))

Page 15
Project name March 2022

q1 = "select * from member where memberid =


{};".format(x)
cursor.execute(q1)
r=cursor.fetchone()
if r:
y =int(input("Enter Book ID"))
q2 = "select bookid, rem_copies from book where
bookid = {};".format(y)
cursor.execute(q2)
r=cursor.fetchone()
if r:
if r[1] > 0:
issuedate = input("Enter Issue Date")
copies = int(input("Enter No of copies"))
remcopies = r[1] - copies
q3 = "insert into issue values({},'{}',{},{},
{});".format(issueid, issuedate, x, y, copies)
cursor.execute(q3)
q4 = "update book set rem_copies = {} where
bookid = {};".format(remcopies,y)
cursor.execute(q4)

Page 16
Project name March 2022

con.commit()
print("Book Issued...")
else:
print("Book is Not Available")
else:
print("Wrong Book ID")
else:
print("wrong Member ID")

def book_return():
q = "select max(returnid) from returns;"
cursor.execute(q)
r = cursor.fetchone()[0]
if r:
returnid = r+1
else:
returnid = 1
x=int(input("Enter Member ID"))
q1 = "select * from member where memberid =
{};".format(x)
Page 17
Project name March 2022

cursor.execute(q1)
r=cursor.fetchone()
if r:
y =int(input("Enter Book ID"))
q2 = "select bookid, rem_copies from book where
bookid = {};".format(y)
cursor.execute(q2)
r=cursor.fetchone()
if r:

returndate = input("Enter return Date")


copies = int(input("Enter No of copies"))
remcopies = r[1] + copies
q3 = "insert into returns values({},{},{},'{}',
{});".format(x, y, returnid, returndate, copies)
cursor.execute(q3)
q4 = "update book set rem_copies = {} where
bookid = {};".format(remcopies,y)
cursor.execute(q4)
con.commit()

Page 18
Project name March 2022

print("Book Returned...")

else:
print("Wrong Book Id")

else:
print("Wrong Member Id")
def col_chart():
q = "select bookid, count(copies) as totalcopies from
issue group by bookid;"
df = pd.read_sql(q,con)
print(df)
plt.bar(df.bookid, df.totalcopies)
plt.xlabel("BookID")
plt.ylabel("Copies Issued")
plt.title("Best Reading Book")
plt.xticks(df.bookid)
plt.show()
while(True):
print("="*78)
Page 19
Project name March 2022

print("\t\t\t------Library Management System------\n")


print("="*78)
print("\t\t\t\tEnter your Choice\n\t\t\t\t1.Book Details\n\t\t\
t\t2.Member Details\n\t\t\t\t3.Transaction\n\t\t\t\t4.Report\n\
t\t\t\t5.Exit")
choice = int(input())
if choice == 1:
while(True):
print("\t\t\t\tEnter Your Choice\n\t\t\t\t1.Add Book
Details\n\t\t\t\t2.Edit Book Details\
\n\t\t\t\t3. Delete A Book\n\t\t\t\t4. Search A Book\
n\t\t\t\t5. Back To Main Menu")
ch = int(input())
if ch == 1:
book_input()
elif ch==2:
book_edit()
elif ch==3:
book_delete()
elif ch==4:
book_search()

Page 20
Project name March 2022

elif ch==5:
break
elif choice ==2:
while(True):
print("\t\t\t\tEnter Your Choice\n\t\t\t\t1.Add Member
Details\n\t\t\t\t2.Edit Member Details\
\n\t\t\t\t3. Delete A Member\n\t\t\t\t4. Search A
Member\n\t\t\t\t5. Back To Main Menu")
ch = int(input())
if ch==1:
member_input()
elif ch==2:
member_edit()
elif ch==3:
member_delete()
elif ch==4:
member_search()
elif ch==5:
break
elif choice == 3:

Page 21
Project name March 2022

while(True):
print("\t\t\t\tEnter Your Choice\n\t\t\t\t1.Issue Book\
n\t\t\t\t2.Return Book\n\t\t\t\t3. Back To Main Menu")
ch = int(input())
if ch==1:
book_issue()
elif ch==2:
book_return()
elif ch==3:
break
elif choice == 4:
while(True):
print("\t\t\t\tEnter Your Choice\n\t\t\t\t1.Book Details\
n\t\t\t\t2. Member Details\
\n\t\t\t\t3. Issue Details\n\t\t\t\t4. Return Details\n\
t\t\t\t5. Best Reading book (Chart)\
\n\t\t\t\t6. Back to Main Menu")
ch = int(input())
if ch == 1:
book_output()

Page 22
Project name March 2022

elif ch==2:
member_output()
elif ch==3:
issue_output()
elif ch==4:
return_output()
elif ch==5:
col_chart()
elif ch==6:
break
elif choice == 5:
break

Page 23
Project name March 2022

OUTPUT SCREEN
Screen-1: WELCOME SCREEN

Screen-2: Adding book details

Page 24
Project name March 2022

Screen-3: Deleting book

Screen-4: Searching book details

Screen-5: Adding member details

Page 25
Project name March 2022

Screen-6: Editing member details

Screen-7: Delete A Member

Page 26
Project name March 2022

Screen-8: Search A member

Screen-9: Issuing books

Page 27
Project name March 2022

Screen-10: Returning books

Screen-11: Book Details

Page 28
Project name March 2022

Screen-12: Member Details

Page 29
Project name March 2022

Screen-13: Issue Details

Page 30
Project name March 2022

Screen-14: Return Details

Page 31
Project name March 2022

Screen-15: Best Reading book (chart)

Page 32
Project name March 2022

Screen-16: Wrong book name entered

Page 33
Project name March 2022

Screen-17: Wrong member id entered

Bibliography:
www.google.com

www.python.org.

Page 34
Project name March 2022

www.geeksforgeeks.org

www.stackoveflow.com Martin Brown and

Martin C Brown, “Python: The Complete

Reference”,Mc-Graw-Hill,2001

Page 35

You might also like