Luckshitha Cs Project Edit
Luckshitha Cs Project Edit
SURAPET
NAME: V.G.Luckshitha
CLASS: 12-A2
ROLL NUMBER:
Date: …………………….
Apart from the efforts taken by me, the success of the project depends largely on the
encouragement and guidelines of many others. I take this opportunity to express my
gratitude to the people who have been instrumental in the successful completion of this
project.
I express deep sense of gratitude to almighty God for giving me the strength to
complete the project successfully.
My sincere thanks to Ms.Kalai Chelvi a guide, mentor,above all a friend, who critically
reviewed my project and guided me during the implementation of the project.
The guidance and support received from all the members who contributed, was vital
for the success of the project. I am grateful for their constant support and help.
1. ABSTRACT
2. SYSTEM CONFIGURATION
3. INTRODUCTION
4. OBJECTIVES OF THE PROJECT
5. PROPOSED SYSTEM
6. LIBRARIES AND FUNCTIONS USED
7. MYSQL QUERIES USED IN THIS PROJECT
8. SOURCE CODE
9. OUTPUT (SCREENSHOT)
10. CONCLUSION
11. BIBILOGRAPHY
ABSTRACT
The Book store management system python project is written in python programming
language. This Book store management system using python is an interesting project. The
user can add the number of book details and you can see the details stored in the form of
list.
A Book shop management system project report about the features of this system, the user
can make the list of books with their author, year, and keep them as records. You just have
to type the book information in the text fields and click on the add button to add the
information on the record.
SYSTEM CONFIGURATION:
HARDWARE CONFIGURATION
Microsoft windows 7 professional/windows 8/windows 8.2:
Processor : Intel Core i3 or equivalent
Memory : 2 GB (32-bit), 4 GB (64-bit)
Disk space : 1.5 GB of free disk space
INTRODUCTION
HARDWARE CONFIGURATION
SOFTWARE REQUIREMENTS
1 GB RAM(2 GB + recommended)
9-58 GB free hard dick space depending for
edition and configuration, including space
required for temporary files
DVD-ROM drive (if installing from a Media kit
DVD)
Basic GPU-Any vendor DirectX 9.0 class or better
(Pixel Shader Level2)
Intel ® Pentium ® or compatible, 1.6 GHz
minimum(2GHz+recommended)
1024x768 or higher-resolution monitor
MOUSE OR OTHER POINTING DEVIC
MODULES USED:
MYSQL.CONNECTOR FUNCTION USED:
1.signup_value()- It is used to create and save new user and
password in database
2.available_books()- It is used to check the existence of a book
3.sell_rec()- It is used to check whether the book is in stock or
sold out and to check how many books were sold out
4.staff_detials- It is used to determine the details of staff working
in the store.
MYSQL QUERIES USED:
1) Create table
mycursor.execute(“create table if not exists signup(usernamevarchar(20),password varchar(20))”)
2) Select
mycursor.execute(“select username from signup where username=”’+username+””)
mycursor.execute(“select password from signup where password=”’=pw=””)
a=mycursor.fetchone()
mycursor.execute(“select*from Available_Books”)
4) Update
mycursor.execute(“update Available_Books set quantity=quantity+”+str(quantity)+”)
SOURCE CODE:
Import MYSQLdb as sql_db
mydb=sql_db.connect(host=’localhost’,user=’root’
while True:
print(“””1:Signup
2:Login”””)
ch=int(input(“SIGNUP/LOGIN(1,2):”))
#SIGNUP
If ch==1:
username=input(“USERNAME:”)
psd=input(“PASSWORD”)
mycursor.execute(“insert into signup values(“”+username+”,”+pw+”)”)
mudb.commit()
#LOGIN
elif ch==2:
username=input(“USERNAME:”)
mycursor.execute(“select username from signup where
username=”’+username+””)
pot=mycurcor.fetchone()
if pot is not None:
print(“VALID USERNAME!!!!!!”)
psd=input(“PASSWORD:”)
mycursor.execute(“select password from signup where password=”’=pw=””)
a=mycursor.fetchone()
if a is not None:
print(“””++++++++++++++++++++++++++LOGIN
SUCCESSFUL+++++++++++++++++++++++++”””)
print(“””+++++++++++++++++++++++++BOOK
STORE+++++++++++++++++++++++”””)
mycursor.execute(“create table if not exists Available _Books(BookName
varchar(30) primark key, Genre varchar(20), Quantity int(3), Author
varchar(20), Publication varchar(30), Price int(4)”)
mycursor.execute(“create table if not exists Sell_rec(Customer Name
varchar(20), Phone Number char(10) unique key, Book Name varchar(30),
Quantity int(100), Price int(4), foreign key(Book Name) references
Available_Books(BookName))”)
mycursor.execute(“create table if not exists Staff_detials(Name varchar(30),
Gender varchar(10), Age int(3), Phone Number char(10) unique key, Address
varchar(40))”)
mydb.commit()
while (True):
print(“””1:Add Books
2:Delete Books
3:Search Books
4:Exit”””)
a=int(input(“Enter your choice:”))
#ADD BOOKS
If a==1:
Print(“All information prompted are mandatory to be filled”)
book=str(input(“Enter Book Name:”))
genre=str(input(“Genre:”))
quantity=int(input(“Enter quantity:”))
author=str(input(“ Enter author name:”))
publication=str(input(“Enter publication house:”))
price=int(input(“Enter the price:”))
mycursor.execute(“select*from Available_Books where
bookname=”’+book+””)
row=mycursor.fetchone()
if row is not None:
mycursor.execute(“update Available_Books
set quantity=quantity+”+str(quantity)+”)
where bookname=”+book+””)
mydb.commit()
print(“””+++++++++++++++++++++++++SUCCESSFULLY
ADDED+++++++++++++++++++++++++”””)
else:
mycursor.execute(“insert into Available_Books(bookname, genre,
quantity, author, publication, price,)
values(“’+book+”’,’”+genre+”’,’”str(quantity)+’”,’”+author+’”,”’+publication+”’,
’”+str(price)+”’)”)
mydb.commit()
print(“””+++++++++++++++++++++++++SUCCESSFULLY
ADDED+++++++++++++++++++”””)
#DELETE BOOKS
elif a==2:
print(“AVAILABLE BOOKS…”)
mycursor.execute(“select*from Available_Books”)
for x in mycursor:
print(X)
cusname=str(input(“Enter customer name:”))
phno=int(input(“Enter phone number:”))
book=str(input(“Enter book name:”))
price=int(input(“Enter the price:”))
n=int(input(“Enter quantity:”))
mycursor.execute(“select quantity from available_books where
bookname=’”+book+”’)
1k=mycursor.fetchone()
If max(1K)<n:
Print(n,”Books are not available!!!!”)
else:
mycursor.execute(“select bookname from available_books where
bookname=”’+book+’”)
log=mycursor.fetchone()
if log is not None:
mycursor.execute(“insert into Sell_rec values
(“’+cusname+”’,”’+str(phno)+”’,”’+book+”’,”’+str(n)+”’,”’+str(price)+”’)”)
mycursor.execute(“update Available_Books set quantity=quantity-
“’+str(n)+”’ where bookname+”’+book+”’”)
mydb.commit()
print(“””+++++++++++++++++++++++++BOOK HAS BEEN
SOLD+++++++++++++++++++++++++++”””)
else:
print(“BOOK IS NOT AVAILABLE!!!!!!!!!”)
#SEARCH BOOKS ON THE BASIS OF GIVEN OPTIONS
elif a==3:
print(“””1:Search by name
2: Search by genre
3: Search by author”””)
l=int(input(“Search by?:”)
#BY BOOKNAME
If l=1:
o=input(“Enter Book to search:”)
mycursor.execute(“select bookname form available_books
where bookname=”’+o+”’)
tree=mycurcor.fetchone()
if tree!=None:
print(“””++++++++++++++++++++++++BOOK IS IN
STOCK++++++++++++++++++”””)
else:
print(“BOOK IS NOT IN STOCK!!!!!!!!!!”)
#BY GENRE
elif l=2:
g=input(“Enter genre to search:”)
mycursor.execute(“select genre from Available_books
where genre=”’+g+’””)
poll=mycursor.fetchall()
if poll is not None:
print(“””+++++++++++++++++++++++BOOK IS IN
STOCK+++++++++++++++++++++”””)
mycursor.execute(“select*from available_books where
genre=”’+g+”’”)
for y in mycursor:
print(y)
else:
print(“BOOKS OF SUCH GENRE ARE NOT
AVAILABLE!!!!!!!!!”)
#BY AUTHOR NAME
elif l=3:
au=input(“Enter author to search:”)
mycursor.execute(“select author from available_books
where author=”’+au+”’”)
home=mycursor.fetchall()
if home is not None:
print(“””++++++++++++++++++++++++++BOOK IS IN
STOCK++++++++++++++++++++++++++++++”””)
mycursor.execute(“select*from available_books
where author=”’+au+”’)
for z in mycursor:
print(Z)
else:
print(“BOOKS OF THIS AUTHOR SRE NOT
AVAILABLE!!!!!!!!!!!!!!!”)
mydb.commit()
elif a==4:
break
#LOGIN ELSE PART
else:
print(“””+++++++++++++++++++++++INCORRECT
PASSWORD++++++++++++++++++++++++++++”””)
else:
print(“””+++++++++++++++++++++++INVALID
USERNAME++++++++++++++++++++++”””)
else:
break
OUTPUT SCREENSHOT
CONCLUSION
Book store management system is an environment
where all the process of the customers in the institution is
managed. It is done through the automated computerized
method. Conventionally this system is done using papers, file
and binders.
References:
1.Python.org
2.CodeAcademy
3.Learnpython.org