You are on page 1of 24

COMPUTER SCIENCE

INVESTIGATORY PROJECT
(Session 2023-2024)

Submitted By: Submitted To:


OM DWIVEDI Mrs. Suleena Sukumaran
Class: XII 'A'

Board Roll No:


CERTIFICATE
This is to certify that Om Dwivedi of class XII-A has
successfully completed the project titled “BOOK
STORE MANAGEMENT” under the guidance of
subject teacher Mrs. Suleena Sukumaran during the
academic year 2023-2024 in partial fulfillment of
Computer Science practical examination conducted
by CBSE.

Signature Signature
(Examiner) (Subject Teacher)

Signature School Seal


(Principal)
ACKNOWLEDGEMEN
T
In the accomplishment of this project successfully, many
people have bestowed upon us their blessings and the
heart pledged support, this time we are utilizing to thank
all the people who have been concerned with this project.
We would like to thank our computer science teacher Mrs.
Suleena Sukumaran, whose valuable guidance has been
the ones that helped us patch this project and make it full
proof success her suggestions and her instructions have
served as the major contributor towards the completion
of the project.
Then we would like to thank may our parents, friends and
classmates who have helped us with their valuable
suggestions and guidance have been helpful in various
phases of the project.

Name: Om Dwivedi
Class: XII 'A'
S. No. CONTENT
01. BOOK STORE MANAGEMENT IN
PYTHON
02. WHAT IS BOOKSTORE MANAGEMENT
SYSTEM USING PYTHON?

03. HOW BOOKSTORE MANAGEMENT


SYSTEM WORKS?

04. AVAILABLE FEATURES

05. WHAT ARE THE BENEFITS OF OWNING


A BOOKSTORE?

06. ABOUT THE PROJECT:- BOOKSTORE


MANAGEMENT SYSTEM USING PYTHON
WITH SOURCE CODE

07. PROGRAM IN PYTHON

08. BIBLIOGRAPHY

INDEX
BOOK STORE
MANAGEMENT IN
PYTHON
The Bookstore Management System Using
Python is a fully functional desktop application
developed in Python that covers all of the
features that IT students and computer-related
courses will require for their college projects or
assignments. This Bookstore Management
System is beneficial to bookstore businesses that
were having difficulty managing their entire book
inventory, as it allows for better and more
organized book management. This Book Store
Management System Python Project is quite
useful, and the concept and logic of the project
are simple to grasp. The source code is open
source and free to use. Simply scroll down and
click the download option.
What Is Bookstore
Management System
Using Python?
The Book Store Management System in Python is
a desktop application that lets users make a list of
books with the names of their authors and the
year they were published, and then keep that list
as a record. To add the information to the record,
all you have to do is type the book’s information
into the text fields and click the “Add” button.
How Bookstore
Management System
Works?
This Bookstore Management System Project in
Python simply works by managing all the books
that have been recorded or inserted into the
system. The system has the capability to update
and delete books within the system. Thus, books
can be searched for the quickest way in the
system.
Available Features
 View Books
 Search Book
 Add Book
 Update Book
 Delete Book
What are the benefits
of owning a
bookstore?
You get to sell something people are really
interested in – Although not everyone enjoys
reading, everyone appreciates a good book.
Something that makes you sit down and turn
pages late at night is entirely satisfying for
everyone. When you run a bookstore, you truly
own a retail environment that can deliver
something quite rare: pure happiness.

Both new and old books can sell well – People


who read a lot will always want to find a new
adventure. This can happen when something new
comes out. Sometimes, though, it comes from
books that are decades old but that many people
still love. In a section for popular authors, you can
find books by both James Patterson and Charles
Dickens. It is rare for an industry to be able to
offer both old and new books in this way.

You don’t always have to keep items that won’t


sell – Many publishers have deals with bookstores
that let them take back books that don’t sell. This
gets rid of the need to buy stock on the chance
that it might not sell. Used bookstores don’t have
this option, but they also tend to have a little more
control over what comes in, so you don’t have to
keep books that don’t sell.

You can help people learn – There are a lot of


important jobs in the world, but this may not
always be true from a retail point of view. The
exception to the rule is book stores. When you can
make a living by selling the chance to learn, you
can work to make your community better one
word at a time. This can be expanded to include
reading events, writing workshops, and other
activities in your store.
About the
Project: Bookstore
Management System Using
Python With Source Code
The Bookstore Management System Using
Python is a desktop application written and
designed in the Python programming language.
The project is open source, and it was made for
novices who wish to learn Python. This Bookstore
Management System Using Python with Source
Code is simple, but it can be useful if you are
running a bookstore business and are struggling
to manage all of the books. The system includes
features that allow you to add books, update
books, delete books, and search books. I hope this
article and project were useful in your Python
development practice.
PROGRAM IN
PYTHON
import sqlite3

def connect():
conn =sqlite3.connect("books.db")
cur= conn.cursor()
cur.execute("CREATE TABLE IF NOT EXISTS book (id INTEGER
PRIMARY KEY, title text, author text, year integer, isbn integer)
")
conn.commit()
conn.close()

def insert(title, author, year, isbn):


conn =sqlite3.connect("books.db")
cur= conn.cursor()
cur.execute("INSERT INTO book VALUES(NULL, ?,?,?,?)",
(title,author,year,isbn))
conn.commit()
conn.close()

def view():
conn =sqlite3.connect("books.db")
cur= conn.cursor()
cur.execute("SELECT * FROM book")
rows =cur.fetchall()
conn.close()
return rows

def search(title="", author="", year="", isbn=""):


conn =sqlite3.connect("books.db")
cur= conn.cursor()
cur.execute("SELECT * FROM book WHERE title=? OR
author=? OR year=? OR isbn=?",(title,author,year,isbn))
rows =cur.fetchall()
conn.close()
return rows

def delete(id):
conn =sqlite3.connect("books.db")
cur= conn.cursor()
cur.execute("DELETE FROM book WHERE id=?",(id,))
conn.commit()
conn.close()

def update(id, title, author, year,isbn ):


conn =sqlite3.connect("books.db")
cur= conn.cursor()
cur.execute("UPDATE book SET title=?, author=?, year=?,
isbn=? WHERE id=?",(title, author, year, isbn,id))
conn.commit()
conn.close()

connect()

BOOKSTORE.PY
from tkinter import *
import backend
window = Tk()

def get_selected_row(event):
try:
global select_tup
index=list1.curselection()[0]
select_tup = list1.get(index)
e1.delete(0,END)
e1.insert(END, select_tup[1])
e2.delete(0,END)
e2.insert(END, select_tup[2])
e3.delete(0,END)
e3.insert(END, select_tup[3])
e4.delete(0,END)
e4.insert(END, select_tup[4])
except IndexError:
pass

def view_command():
list1.delete(0,END)
for row in backend.view():
list1.insert(END, row)

def search_command():
list1.delete(0,END)
for row in
backend.search(title_text.get(),author_text.get(),year_text.get(
), isbn_text.get()):
list1.insert(END,row)

def add_book():

backend.insert(title_text.get(),author_text.get(),year_text.get(),
isbn_text.get())
list1.delete(0,END)
list1.insert(END,
(title_text.get(),author_text.get(),year_text.get(),
isbn_text.get()))

def delete_book():
backend.delete(select_tup[0])

def update_book():
backend.update(select_tup[0],
title_text.get(),author_text.get(),year_text.get(),
isbn_text.get())
window.wm_title("Book Store")

l1 = Label(window, text="Title")
l1.grid(row=0,column=0)

l2 = Label(window, text="Auther")
l2.grid(row=0,column=2)

l3 = Label(window, text="Year")
l3.grid(row=1,column=0)

l4 = Label(window, text="ISBN")
l4.grid(row=1,column=2)

title_text = StringVar()
e1 = Entry(window, textvariable= title_text)
e1.grid(row=0, column=1)
author_text = StringVar()
e2 = Entry(window, textvariable= author_text)
e2.grid(row=0, column=3)

year_text = StringVar()
e3 = Entry(window, textvariable= year_text)
e3.grid(row=1, column=1)

isbn_text = StringVar()
e4 = Entry(window, textvariable= isbn_text)
e4.grid(row=1, column=3)

list1 = Listbox(window, height=6, width=35)


list1.grid(row=2, column =0, rowspan=6, columnspan=2)

list1.bind("<<ListboxSelect>>", get_selected_row)
sb1 =Scrollbar(window)
sb1.grid(row=2, column=2 ,rowspan = 6)

list1.configure(yscrollcommand=sb1.set)
sb1.configure(command=list1.yview)

b1 =Button(window, text= "View All", width=12,


command=view_command)
b1.grid(row=2, column=3)

b2 =Button(window, text= "Search Book", width=12,


command=search_command)
b2.grid(row=3, column=3)

b3 =Button(window, text= "Add Book", width=12,


command=add_book)
b3.grid(row=4, column=3)
b4 =Button(window, text= "Update", width=12,
command=update_book)
b4.grid(row=5, column=3)

b5 =Button(window, text= "Delete", width=12,


command=delete_book)
b5.grid(row=6, column=3)

b6 =Button(window, text= "Close", width=12,


command=window.destroy)
b6.grid(row=7, column=3)

window.mainloop()
BIBLIOGRAPHY
 COMPUTER SCIENCE WITH PYTHON
BY SUMITA ARORA
 https://sourcecodehero.com/bookstore-
management-system-using-python-with-
source-code/
 https://pythonworld.in/practical-project/
project-list/

You might also like