0% found this document useful (0 votes)
22 views27 pages

Ilovepdf Merged

The document is a project report on an Inventory Management System (IMS) for a bookstore, developed using Python and MySQL. It outlines the system's features, including adding, updating, deleting, and searching for books, as well as managing customer details. The report includes acknowledgments, system requirements, flow charts, source code, and output screenshots.

Uploaded by

neharajeev765
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)
22 views27 pages

Ilovepdf Merged

The document is a project report on an Inventory Management System (IMS) for a bookstore, developed using Python and MySQL. It outlines the system's features, including adding, updating, deleting, and searching for books, as well as managing customer details. The report includes acknowledgments, system requirements, flow charts, source code, and output screenshots.

Uploaded by

neharajeev765
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/ 27

PROJECT ON

INVENTORY MANAGEMENT
PROJECT REPORT
COMPUTER SCIENCE FOR CLASS XII
(2024-2025)

Submitted in partial fulfillment of the requirement of CBSE, Delhi

BY R.NEHA TEJARAKSHA

Enrollment No:
UNDER THE GUIDANCE OF
Mrs. C.KALAIMANI
M.Sc(cs),Mphil,B.Ed
(P.G.T COMPUTER SCIENCE)
AKSHAYA ACADEMY CBSE SENIOR
SECONDARY SCHOOL, ODDANCHATRAM.

i
AKSHAYA ACADEMY CBSE SENIOR SECONDARY SCHOOL
ODDANCHATRAM

COMPUTER SCIENCE
2024-2025

BONAFIDE CERTIFICATE

This is to certify that this project entitles “BOOK STORE


MANAGEMENT ” is a record bonafide work carried out by R.NEHA
TEJARAKSHA in COMPUTER SCIENCE prescribed by AKSHAYA
ACADEMY CBSE SENIOR SECONDARY
SCHOOL,ODDANCHATRAM.

ROLL NUMBER: DATE:

INTERNAL EXAMINER EXTERNAL EXAMINER

PRINCIPAL

ii
ACKNOWLEDGEMENT

First I thank the Almighty for providing me everything that

I required in completing this project. I express my Gratitude

to my Principal Mrs.R.Sowmya,

My Coordinator Mr.A.Balaji and My Computer Science

teacher Mrs.C.Kalaimani who guided me through the project

and also gave valuable suggestion and guidance for completing

the project, also helped me to understand the intricate involved

in making the project. I would like to extend my sincere thanks to

all of them . I also thank my parents and my friends who helped

to complete the project successfully.

iii
TABLE OF CONTENTS

SNO DESCRIPTION PAGE NO

1 INTRODUCTION 1

2 SYSTEM REQUIREMENTS 2

3 FLOW CHART 3

4 SOURCE CODE 13

6 OUTPUT SCREENSHOTS 21

7 CONCLUTION 24

8 BIBLIOGRAPHY 25

iv
1. INTRODUCTION
This project BOOKSTORE SYSTEM includes some facilities for the retail
book store to maintain records of the books and also search, display,
modification, delete the books available. This software searches the books
data which is store in the record.
The software used for small shops for maintaining their records related to
books selling, printing the reports and cost savings. Book distributers
transaction handling is one of the complex process and it required
computerised system to maintain overall transaction in an easier manner.
Due to heavy demand of books in these competitive worlds, data increase so
much. Books store required up to date information about the customer who
purchased books or about the suppliers from where books are purchased. The
books store requires large amount of data to record and to store, which are
collected from the Book House.
In this project, we will develop an Inventory Management System (IMS)
using Python and Mysql. This system will provide an interface for
businesses to manage their inventory with features like adding new products,
updating product details, deleting obsolete products, viewing current stock
levels, and generating basic reports.

1
2. System Requirements
2.1. Software requirements:
Operating system: Windows 10 & above any Linux platform
Editor: Visual Studio Code or any other editor like Python IDLE, i5 5th
generation, Sublime Text that supports python.
Core software: Python 3.12 or 3.13 or the latest available version at the time
of installation.
2.2 Hardware requirements:
Processor: PENTIUM-IV GHz or any INTEL Processor minimum (i5, 5th or 6th
processor) and above.
Ram: Minimum requirement (8 GB, 128 GB SSD)
Hard disk: Minimum of 20 GB of space any make of your choice.

2
3. FLOW CHART

START

Import mysql.connector as happiness


mycon=happiness.connect(host=’localhost’,user=’roo
t’,passwd=’root’)
cursor=mycon.cursor()
cursor.execute(“create database if not exists
bookstore”)
cursor.execute(“use bookstore”)

print(“””====MY
BOOKSTORE===”””)

cursor.execute(“create table if not exists


available_books(book_id int primary key, genre
varchar(50),edition int,book_name varchar(90),publisher
varchar(90),price int)”)
cursor.execute(“create table if not exists
customer_details(name varchar(90),gender varchar(20),age
int,phone_number int unique key,address varchar(90))”)
mycon.commit()

3
while(True):

print(“”1:add books
2:delete books
3:search books
4:update books
5:customer details
6:available books
7:exit””)
a=int(input(“enter your choice
”)

if
a==1:(add)

print(“All information prompted are mandatory to be


filled”)
b_id=int(input(“enter book id:”))
genre=input(“genre:”)
edition=int(input(“enter edition:”))
name=input(“enter book name:”)
price=int(input(“enter the price:”))
pub=input(“enter publisher:”)

4
elif
a==2(dele
tete)

Bname=input(“enter book name to delete:”)


print(“+++++++++++++SUCESSFULLY
DELETED+++++++++++++”)

elif a==3:(search
book)

print(“1:search by book name


2:search by book genre
3:search by publisher”)
L=int(input(“search by ?:”)

if l==1:(search
by book name)

5
o=input(“enter book name to search:”)
print(“++++++++++++BOOK IS IN
STOCK++++++++++++”)

elif l==2:(search by
book genre)

g=input(“enter book genre to search:”)


print(“+++++++++BOOK IS IN
STOCK++++++++”)

elif l==3:(search
by publisher)

Au=input(“enter publisher to search:”)


print(“+++++BOOK IS IN STOCK+++++”)

6
elif a===4(UPDATE
PRODUCT)

print(“1: By edition”)
print(“2: By price”)
cr=int(input(“enter your choice”))

if cr==1:

Name=input(“enter the book name whose


edition needs to be updated:”)
print(“UPDATE ROW”)
print(“SUCESSFULLY UPDATED”)

elif cr==2:

7
Name=input(“enter the book name
whose price to be updated”)
print(“SUCESSFULLY
UPDATED”)

elif a==5:(CUSTOMER
DETAILS)

print(“1:new customer entry”)


print(“2:remove customer”)
print(“3:existing customer details”)
ch=int(input(“enter your choice”))

If ch==1:(new
customer entry)

8
fname=str(input(“enter fullname:”))
gender=str(input(“gender(m/f/o:”))
age=int(input(“age”))
phno=int(input(“phoneno”))
print(“++++++++CUSTOMER IS SUCESSFULLY
ADDED++++++++”)

elif
ch==2:(REMOV
E CUSTOMER)

nm=str(input(“enter customer name to


remove”))
print=(“++++++++++++CUSTOMER
SUCESSFULLY
REMOVED++++++++++++”)

elif ch==3:

9
cursor.execute(“select * from customer_details”)
cust=cursor.fetchall()

if cust is
not NONE:

print(“CUSTOMER DETAILS”)
for i in cust:

print(i)

else:

print(“NO CUSTOMER
EXISTS!!!”)

10
elif
a==6(AVAILABLE)

print(“AVAILABLE BOOKS IN
STORE”)

elif
a==7:(EXIT)

break

STOP

11
4. PROJECT DESCRIPTION

Book store system is the python computerised application used for maintaining
the book store.
FUNCTIONS USED IN THE PROGRAM:
#ADD BOOKS
#DELETE BOOKS
#SEARCH BOOKS

#Search by book name


#Search by book genre
#Search by publisher
#UPDATE BOOKS
#Update by edition
#Update by price
#CUSTOMER DETAILS
#New customer entry
#Remove customer
#Existing customer details
#AVAILABLE BOOKS
#EXIT

12
5. SOURCE CODE

import mysql.connector as happiness # CREATING CONNECTION OBJECT


mycon = happiness.connect(host="localhost", user="root", password="root") #
CREATING DATABASE AND TABLE
cursor = mycon.cursor()

cursor.execute("CREATE DATABASE IF NOT EXISTS bookstore")


cursor.execute("USE bookstore")
print("""====MY BOOKSTORE====""")

cursor.execute("""
CREATE TABLE IF NOT EXISTS available_books(
book_id INT PRIMARY KEY,
genre VARCHAR(50),
edition INT,
book_name VARCHAR(90),
publisher VARCHAR(90),
price INT
)
""")

cursor.execute("""
CREATE TABLE IF NOT EXISTS customer_details(
name VARCHAR(90),
gender VARCHAR(20),
age INT,

13
phone_number VARCHAR(15) UNIQUE, -- Changed to VARCHAR to
handle leading zeros
address VARCHAR(90)
)
""")

mycon.commit()

while True:
print("1: add books 2: delete books 3: search books 4: update books 5:
customer details 6: available books 7: exit")
a = int(input("Enter your choice: "))

# ADD BOOK
if a == 1:
print("All information prompted are mandatory to be filled")
b_id = int(input("Enter book ID: "))
genre = input("Genre: ")
edition = int(input("Enter edition: "))
name = input("Enter book name: ")
price = int(input("Enter the price: "))
pub = input("Enter publisher: ")

cursor.execute("""
INSERT INTO available_books(book_id, genre, edition, book_name,
publisher, price)
VALUES(%s, %s, %s, %s, %s, %s)
""", (b_id, genre, edition, name, pub, price))

14
mycon.commit()
print("++++ SUCCESSFULLY ADDED ++++")

# DELETE BOOK
elif a == 2:
print("Available books:")
cursor.execute("SELECT * FROM available_books")
for x in cursor:
print(x)
Bname = input("Enter book name to delete: ")
cursor.execute("DELETE FROM available_books WHERE
book_name=%s", (Bname,))
mycon.commit()
print("Book successfully deleted")

# SEARCH BOOKS
elif a == 3:
print("1: Search by book name 2: Search by book genre 3: Search by
publisher")
L = int(input("Search by: "))

# By book name
if L == 1:
o = input("Enter book name to search: ")
cursor.execute("SELECT * FROM available_books WHERE
book_name=%s", (o,))
tree = cursor.fetchone()
if tree:

15
print("++++++++++++ BOOK IS IN STOCK ++++++++++")
print(tree)
else:
print("BOOK IS NOT IN STOCK")

# By book genre
elif L == 2:
g = input("Enter book genre to search: ")
cursor.execute("SELECT * FROM available_books WHERE
genre=%s", (g,))
poll = cursor.fetchone()
if poll:
print("+++++++++ BOOK IS IN STOCK AVAILABLE")

# By publisher
elif L == 3:
au = input("Enter publisher to search: ")
cursor.execute("SELECT * FROM available_books WHERE
publisher=%s", (au,))
home = cursor.fetchone()
if home:
print("+++++ BOOK IS IN STOCK +++++")
print(home)
else:
print("BOOKS OF THIS PUBLISHER ARE NOT AVAILABLE")

# UPDATE BOOK
elif a == 4:

16
print("1: By edition")
print("2: By price")
cr = int(input("Enter your choice: "))

# By edition
if cr == 1:
Name = input("Enter the book name whose edition needs to be updated:
")
edt = int(input("Enter the edition to be updated: "))
cursor.execute("UPDATE available_books SET edition=%s WHERE
book_name=%s", (edt, Name))
print("UPDATED ROW")
cursor.execute("SELECT * FROM available_books WHERE
book_name=%s", (Name,))
plan = cursor.fetchone()
print(plan)
print("SUCCESSFULLY UPDATED")

# By price
elif cr == 2:
Name = input("Enter book name whose price is to be updated: ")
newprice = int(input("Enter the new price: "))
cursor.execute("UPDATE available_books SET price=%s WHERE
book_name=%s", (newprice, Name))
print("UPDATED ROW")
cursor.execute("SELECT * FROM available_books WHERE
book_name=%s", (Name,))
added = cursor.fetchone()
print(added)

17
print("SUCCESSFULLY UPDATED")

# CUSTOMER DETAILS
elif a == 5:
print("1: New customer entry")
print("2: Remove customer")
print("3: Existing customer details")
ch = int(input("Enter your choice: "))

# NEW CUSTOMER ENTRY


if ch == 1:
fname = str(input("Enter fullname: "))
gender = str(input("Gender (m/f/o): "))
age = int(input("Age: "))
phno = input("Phone number: ") # Changed to string to handle non-
numeric characters and leading zeros
if len(phno) != 10 or not phno.isdigit():
print("Invalid phone number")
else:
address = str(input("Address: "))
cursor.execute("""
INSERT INTO customer_details(name, gender, age,
phone_number, address)
VALUES(%s, %s, %s, %s, %s)
""", (fname, gender, age, phno, address))
mycon.commit()
print("+++++++++ CUSTOMER IS SUCCESSFULLY ADDED
++++++++")

18
# REMOVE CUSTOMER
elif ch == 2:
nm = str(input("Enter customer name to remove: "))
cursor.execute("SELECT name FROM customer_details WHERE
name=%s", (nm,))
toy = cursor.fetchone()
if toy:
cursor.execute("DELETE FROM customer_details WHERE
name=%s", (nm,))
mycon.commit()
print("++++++++++++ CUSTOMER SUCCESSFULLY REMOVED
+++++++")
else:
print("CUSTOMER DOES NOT EXIST")

# EXISTING CUSTOMER DETAILS


elif ch == 3:
cursor.execute("SELECT * FROM customer_details")
cust = cursor.fetchall()
if cust:
print("CUSTOMER DETAILS")
for i in cust:
print(i)
else:
print("NO CUSTOMER EXISTS")

# AVAILABLE BOOKS

19
elif a == 6:
print("AVAILABLE PRODUCTS IN STORE")
cursor.execute("SELECT * FROM available_books ORDER BY
book_name")
row = cursor.fetchall()
for y in row:
print(y)

# EXIT
elif a == 7:
break

mycon.close()
print("Program completed")

20
6. OUTPUT SCREENSHOTS
6.1 Main menu:

6.2 Add Books:

6.3 Delete Books:

6.4 Search Books:


6.4.1 Search By Book Name:

6.4.2 Search By Book Genre:

21
6.4.3 Search By Publisher:

6.5 Update Books:

6.5.1 By Edition:

6.5.2 By Price:

6.6 Customer Details:


6.6.1 New Customer Entry:

22
6.6.2 Remove Customer:

6.6.3 Existing Customer Details:

6.7 Available Books:

6.8 Exit:

23

You might also like