0% found this document useful (0 votes)
44 views16 pages

Quiz Project File

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 16

LIBRARY

MANAGEMENT
SRDKVV
SCHOOL PROJECT

Name: H.Monish
V.Madhavan
P.S.Saisreesannth
Class: XII-’C’
Subject: Computer Science
Topic: Library Management
BONAFIDE CERTIFICATE

Certified to be the Bonafide Project work done by H.Monish,


V.Madhavan, P.S.Saisreesannth of class XII C in the SRI RAM DAYAL
KHEMKA VIVEKANANDA VIDYALAYA JUNIOR COLLEGE, Chennai –
600019 during the year 2022 -2023.

Dated : _____________ Principal Subject


Teacher

Submitted for Senior School Certificate Examination held in Computer


Science at

SRI RAM DAYAL KHEMKA VIVEKANANDA VIDYALAYA JUNIOR


COLLEGE, Chennai

Dated : _______________ External


Examiner

School Seal
ACKNOWLEDGEMENT
I would like to express my special thanks of gratitude to my Computer
Science Teacher Smt. D. Nalini Devi for her able guidance and support in
completing this project.

I would also like to extend my gratitude to our Correspondent


Sri. C. Krishnan and our Principal Dr. B. Usha Rani for providing me with all
the required facilities.

Secondly, I would also like to thank my parents and friends who


helped me a lot in finishing this project within the limited time. Just because
of them I was bale to create my project and make it good and enjoyable
experience.

Thanks again to all who helped me during the project.


SYSTEM REQUIREMENTS

1. HARDWARE

 Processor
 Keyboard
 Minimum memory – 2 GB

2. SOFTWARE

 Operating System
 Python IDLE
 MySQL
Introduction to Python

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


multiple programming paradigms, including structured (particularly
procedural), object-oriented and functional programming. It is
often described as a “batteries included” language due to its
comprehensive standard library.
Guido van Rossum began working on Python in the late 1980s as
a successor to the ABC programming language and first released
it in 1991(20 February 1991; 31 years ago) as Python 0.9.0.
Python 2.0 was released in 2000 and introduced new features
such as list comprehensions, cycle-detecting garbage collection,
reference counting, and Unicode support. Python 3.0, released in
2008, was a major revision that is not completely backward-
compatible with earlier versions. Python 2 was discontinued with
version 2.7.18 in 2020.
Python consistently ranks as one of the most popular
programming languages. It works on Windows, macOS,
Linux/UNIX, Android and more. Many apps had been built using
Python, some of them are
Spotify,Facebook,Instagram,Quara,Uber and many more.
Introduction to MYSQL

MySQL is an open-source relational database management


system (RDBMS). Its name is a combination of “My”, the name of
co-founder Michael Widenius’s daughter My, and “SQL”, the
abbreviation for Structured Query Language. A relational
database organizes data into one or more data tables in which
data 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.
MySQL has stand-alone clients that allow users to interact directly
with a MySQL database using SQL, but more often, MySQL is
used with other programs to implement applications that need
relational database capability. MySQL is used by many database-
driven web applications, including Drupal, Joomla, phpBB, and
WordPress. MySQL is also used by many popular websites,
including Facebook, Flickr, MediaWiki, Twitter and YouTube.
Initial released on 23 May 1995(27 years ago). Built using
Programming languages: C, C++. Works in Operating systems:
Linux, Solaris, macOS, Windows, FreeBSD
LIBRARY MANAGEMENT
A library management system is software that is
designed to manage all the functions of a library. It
helps librarian to maintain the database of new
books and the books that are borrowed by members
along with their due dates.
This system completely automates all your library’s
activities. The best way to maintain, organize, and
handle countless books systematically is to
implement a library management system software.
A library management system is used to maintain
library records. It tracks the records of the number of
books in the library, how many books are issued, or
how many books have been returned or renewed or
late fine charges, etc.
You can find books in an instant, issue/reissue
books quickly, and manage all the data efficiently
and orderly using this system. The purpose of a
library management system is to provide instant and
accurate data regarding any type of book, thereby
saving a lot of time and effort.
LIBRARY MANAGEMENT
Source code
import mysql.connector as l

d=l.connect(host="localhost" , user="root" , password="srdkvv" , database="librarymsm2023")

library=d.cursor()

def insertrecord():

no=int(input("Enter the serial no"))

s=input("Enter the name")

pu=input("Enter publisher")

ed=input("Enter edition")

au=input("Enter author")

qty=int(input("enter the required qty"))

sql= "insert into librarymsm (sno, name_book, publisher, edition, authorname,qty) values(%s,
%s, %s, %s, %s, %s)"

data=(no,s,pu,ed,au,qty)

library.execute(sql, data)

d.commit()

library.execute("select * from librarymsm")

x=library.fetchall()

print(x)

d.close()

def deleterecord():

no=int(input("enter sno"))

sql="delete from librarymsm where sno=%s "


dele=(no,)

library.execute (sql,dele)

d.commit()

library.execute("select * from librarymsm")

x=library.fetchall()

print(x)

d.close()

def displayrecord():

sql="select * from librarymsm"

library.execute(sql)

x=library.fetchall()

no=int(input("enter sno"))

for i in x:

if i[0]==no:

print(i)

d.close()

def updaterecordall():

q=int(input("enter quantity"))

sql="update librarymsm set qty=%s"

upd=(q,)
library.execute(sql, upd)

d.commit()

library.execute("select * from librarymsm")

x=library.fetchall()

print(x)

d.close()

def updaterecord():

n=int(input("enter the number to be modified"))

q=int(input("enter quantity"))

sql="update librarymsm set qty=%s where sno=%s"

upd=(q,n)

library.execute(sql, upd)

d.commit()

library.execute("select * from librarymsm")

x=library.fetchall()

print(x)

d.close()

while True:

print("1.Insert\n2.Delete\n3.Display\n4.Update\n5.Update All\n6.exit")

lib=int(input("enter your choice"))

if lib==1:

insertrecord()

elif lib==2:

deleterecord()

elif lib==3:

displayrecord()
elif lib==4:

updaterecord()

elif lib==5:

updaterecordall()

else:

Break
OUTPUT

You might also like