PDFen
PDFen
SESSION:2024-2025
INVESTIGATORYPROJECT
Roll No:
Class- 12th
ONCOMPUTERSCIENCE
Under the teacher's supervision. He has taken proper care
and shown utmost sincerity while collecting the data and
analyzing all the relevant information needed for the
project on the “Book store management system” and it
has been found satisfactory as per the guidelines issued by
C.B.S.E.
SIGNATURES:
SCHOOLSEAL:
ACKNOWLEDGEMENT
First and foremost, I thank God for his assistance and
blessings. The work wouldn’t have been possible without
the guidance of my Computer Science Teacher who
provided a helping hand in the endeavor.
I am also indebted to my parents and classmates, whose
constant support and encouragement were also helpful for
attaining the project in this present form.
THANK YOU
Pratham Bhatt
DECLARATION
I do hereby declare that the work is presented in the
standard XII Science project entitled “Book Store
Management” is partial fulfillment of requirements
for the award of the All India Senior Certificate
Examination (AISCE) and submitted to the department
of Computer Science of Anand Niketan School,
Mehsana is an authentic record of my own work
carried out during academic 2024-2025 under the
supervision of Mr. Ujaval Jani Anand Niketan
School.
1. OBJECTIVE OF 2
THE PROJECT
2. HARDWARE / SOFTWARE 3
REQUIREMENTS
4. MODULES 4
5. SOURCECODE 5-11
6. OUTPUT 12-15
7. MY SQL OUTPUT 16
8. BIBLIOGRAPHY 17
OBJECTIVE OF THE PROJECT:
1. Add Book: Allowing users to add new books to the system by entering
relevant details such as title, author, price, genre, ISBN, and stock
quantity.
2. Delete Book: Enabling users to remove books from the inventory
based on specific criteria such as ISBN or title.
3. Update Book: Providing the capability to modify existing book details
such as price, stock quantity, author, or genre.
4. Search Book: Implementing a search function that allows users to find
books based on various parameters like title, author, genre, or ISBN.
Key Features:
2
HARDWAR REQUIREMENTS:
➢ Processor:IntelPentium4orlaterorcompatible
➢ HardDisk:410GBormore
➢ RAM:1GBormore
➢ Printer: Any
➢ Monitor: SVG A color monitor(touch screen or simple)
SOFTWAREREQUIREMENTS:
3
MODULES:
4
SOURCECODE
import mysql.connector
mydb.commit()
5
# Main menu loop
while True:
print("\n\n1: Signup 2: Login")
ch = int(input("SIGNUP/LOGIN (1, 2): "))
# SIGNUP
if ch == 1:
username = input("USERNAME: ")
pw = input("PASSWORD: ")
# LOGIN
elif ch == 2:
username = input("USERNAME: ")
mycursor.execute("SELECT username FROM signup WHERE username = %s",
(username,))
pot = mycursor.fetchone()
# ADD BOOKS
if a == 1:
print("\nAll information prompted are mandatory to be filled\n")
book = input("Enter Book Name: ")
genre = input("Genre: ")
quantity = int(input("Enter quantity: "))
author = input("Enter author name: ")
publication = input("Enter publication house: ")
price = int(input("Enter the price: "))
7
elif a == 2:
print("""1: Search by name \n2: Search by genre \n3: Search by
author""")
l = int(input("Search by?: "))
if l == 1:
o = input("Enter Book to search: ")
mycursor.execute("SELECT BookName FROM Available_Books
WHERE BookName = %s", (o,))
tree = mycursor.fetchone()
if tree:
print("++++++++++++++++++++++ BOOK IS IN STOCK
+++++++++++++++++++++++")
else:
print("BOOK IS NOT IN STOCK!!!!!!!")
elif l == 2:
g = input("Enter genre to search: ")
mycursor.execute("SELECT * FROM Available_Books WHERE Genre =
%s", (g,))
poll = mycursor.fetchall()
if poll:
print("++++++++++++++++++++++ BOOKS ARE IN STOCK
+++++++++++++++++++++++")
for y in poll:
print(y)
else:
print("BOOKS OF SUCH GENRE ARE NOT AVAILABLE!!!!!!!!!")
elif l == 3:
au = input("Enter author to search: ")
mycursor.execute("SELECT * FROM Available_Books WHERE Author = %s",
(au,))
home = mycursor.fetchall()
if home:
print("++++++++++++++++++++++ BOOKS ARE IN STOCK
+++++++++++++++++++++++")
8
for z in home:
print(z)
else:
print("BOOKS OF THIS AUTHOR ARE NOT AVAILABLE!!!!!!!")
# DELETE BOOK
elif a == 3:
book = input("Enter the name of the book to delete: ")
mycursor.execute("SELECT * FROM Available_Books WHERE
BookName = %s", (book,))
row = mycursor.fetchone()
# UPDATE BOOK
elif a == 4:
book = input("Enter the name of the book to update: ")
mycursor.execute("SELECT * FROM Available_Books WHERE
BookName = %s", (book,))
row = mycursor.fetchone()
9
mydb.commit()
print(f"++++++++++++++++++++++++ QUANTITY FOR '{book}' UPDATED
+++++++++++++++++++++++")
elif update_choice == 2:
new_price = int(input("Enter new price: "))
mycursor.execute("UPDATE Available_Books SET Price = %s WHERE
BookName = %s", (new_price, book))
mydb.commit()
print(f"++++++++++++++++++++++++ PRICE FOR '{book}' UPDATED
+++++++++++++++++++++++")
else:
print("BOOK NOT FOUND!")
# AVAILABLE BOOKS
elif a == 5:
mycursor.execute("SELECT * FROM Available_Books ORDER BY BookName")
for v in mycursor:
print(v)
10
# EXIT
elif a == 6:
print("\nThank you")
break
else:
print("++++++++++++++++++++++++ INCORRECT PASSWORD
+++++++++++++++++++++++")
else:
print("++++++++++++++++++++++ INVALID USERNAME
+++++++++++++++++++++++")
else:
break
11
OUTPUT
12
13
14
FD
15
MY SQL OUTPUT:
16
BIBLIOGRAPHY:
17
18