VELAMMAL VIDHYASHRAM
SURAPET
COMPUTER SCIENCE
Topic: Book Store Management
Academic year: 2022-2023
Done By:
[Link] XII - A
BONAFIDE CERTIFICATE
This is to certify that this COMPUTER SCIENCE Project on the topic
"BANK MANAGEMENT SYSTEM” has been successfully completed by __________ of class XII
A5, [Link]…………………... at Velammal Vidhyashram, Surapet, for the partial fulfilment of this
project as a part of Senior Secondary Certificate Examination-CBSE, New Delhi for the
academic Year 2022- 2023.
Date: ……………………..
Signature of Principal Teacher incharge
Signature of the Signature of the
Internal Examiner External Examiner
ACKNOWLEDGEMENT
Apart from the efforts of me, the success of any 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 strength for the successful
completion of the project.
I express my heartfelt gratitude to my parents for constant encouragement while carrying
out this project.
I gratefully acknowledge the contribution of the individuals who contributed in bringing this
project up to this level, who continues to look after me despite my flaws,
I express my deep sense of gratitude to the luminary The Director, Principal, Tilak Wing
Velammal vidhyashram surapet who has been continuously motivating and extending their
helping hand to us.
I express my sincere thanks to the CEO. Mr. VelMurugan Velammal vidhyashram
surapet,
for providing these opportunity in doing these project
My sincere thanks to [Link] Gnanasekaran, Master In-charge, A guide,
Mentor all the above a friend, who critically reviewed my project and helped in solving each and
every problem, occurred during implementation of the project
The guidance and support received from all the members who contributed and who are
contributing to this project, was vital for the success of the project. I am grateful for their constant
support and help.
TABLE OF CONTENT:
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
[Link]
ABSTRACT:
Bank Management System project is developed using Python and MySQL Database. This
application provides an easy way to the admin in searching the details of the customer details
and transaction details of the customer. Bank Management system project in Python is a simple
console application. In this project, users can perform typical Bank related functions like adding
a new customer record and displaying and deleting it.
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
SOFTWARE REQUIREMENTS
1 GB RAM (2 GB+ recommended)
9-58 GB free hard disk space depending on 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 Level 2)
Intel® Pentium® or compatible, 1.6 GHz minimum (2GHz+ recommended)
1024x768 or higher-resolution monitor
MOUSE OR OTHER POINTING DEVICE
INTRODUCTION
"BANK MANAGEMENT SYSTEM" This project is useful for the bank employees as well as
customers to keep a track of account details. The emerging of digital system made information
available on finger tips. By automating the transactions one can view the details as and when
required in no time. This project emphases on creation of new customer accounts, managing the
existing account holders in the bank, by making digital system one can generate daily reports,
monthly reports and annual reports which can enhance the system.
OBJECTIVES OF THE PROJECT
The objective of this project is to let the students apply the programming knowledge into a
real- world situation/problem and exposed the students how programming skills helps in
developing a good software.
1. Write programs utilizing modern software tools.
2. Apply object oriented programming principles effectively when developing small to medium
sized projects.
3. Write effective procedural code to solve small to medium sized problems.
4. Students will demonstrate a breadth of knowledge in computer science, as exemplified in
the areas of systems, theory and software development.
5. Students will demonstrate ability to conduct a research or applied Computer Science
project, requiring writing and presentation skills which exemplify scholarly style in computer
science.
PROPOSED SYSTEM
LIBRARIES AND FUNCTIONS USED:
1. mysqlconnector - MySQL Connector/Python enables Python programs to access MySQL
databases, using an API that is compliant with the Python Database API Specification v2.0
(PEP 249). It is written in pure Python and does not have any dependencies except for the
Python Standard Library.
FUNCTIONS USED: WRITE IN DETAIL ABOUT PURPOSE OF THE FUNCTION.
1. CreateBankaccount() - Using these function we will accept the new customer details
2. Transaction ( ) - Using these function we will get the account number of the
customer and check the no is valid or not. If it is valid and we will
proceed to withdraw or add amount to the account.
3. Customer_details( ) – Using these function we can retrieve the details of the customer if
the entered account no is valid.
4. Transaction_details( ) – if the account no is valid and we can retrieve what are the
transactions are done by the customer.
5. Delete_Account( ) - using these function we can accept the account no and on
confirmation we can delete a particular customer account.
6. quit() - if you are not going perform any of the above operation we
can come out of the login
SOURCE CODE:
import [Link]
mydb=[Link](host="localhost",user="root",password="vijay")
#CREATING DATABASE AND TABLE
mycursor=[Link]()
[Link]("create database if not exists store")
[Link]("use store")
[Link]("create table if not exists signup(username varchar(20),password
varchar(20))")
while True:
print("""1:Signup
2:Login""")
ch=int(input("SIGNUP/LOGIN(1,2):"))
#SIGNUP
if ch==1:
username=input("USERNAME:")
pw=input("PASSWORD:")
[Link]("insert into signup values('"+username+"','"+pw+"')")
[Link]()
#LOGIN
elif ch==2:
username=input("USERNAME:")
[Link]("select username from signup where username='"+username+"'")
pot=[Link]()
if pot is not None:
print("VALID USERNAME!!!!!!")
pw=input("PASSWORD:")
[Link]("select password from signup where password='"+pw+"'")
a=[Link]()
if a is not None:
print("""+++++++++++++++++++++++
+++LOGIN SUCCESSFULL+++
+++++++++++++++++++++++""")
print("""===================================================================
===
++++++++++++++++++++++++++ [Link] STORE +++++++++++++++++++++++++
==========================================================================
""")
[Link]("create table if not exists Available_Books(BookName
varchar(30) primary key,Genre varchar(20),Quantity int(3),Author varchar(20),Publication
varchar(30),Price int(4))")
[Link]("create table if not exists Sell_rec(CustomerName
varchar(20),PhoneNumber char(10) unique key, BookName varchar(30),Quantity
int(100),Price int(4),foreign key (BookName) references Available_Books(BookName))")
[Link]("create table if not exists Staff_details(Name varchar(30),
Gender varchar(10),Age int(3), PhoneNumber char(10) unique key , Address varchar(40))")
[Link]()
while(True):
print("""1:Add Books
2:Delete Books
3:Search Books
4:Staff Details
5:Sell Record
6:Available Books
7:Total Income after the Latest Reset
8: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:"))
[Link]("select * from Available_Books where
bookname='"+book+"'")
row=[Link]()
if row is not None:
[Link]("update Available_Books set
quantity=quantity+'"+str(quantity)+"' where bookname='"+book+"'")
[Link]()
print("""++++++++++++++++++++++
++SUCCESSFULLY ADDED++
++++++++++++++++++++++""")
else:
[Link]("insert into
Available_Books(bookname,genre,quantity,author,publication,price)
values('"+book+"','"+genre+"','"+str(quantity)+"','"+author+"','"+publication+"','"+str(price)
+"')")
[Link]()
print("""++++++++++++++++++++++
++SUCCESSFULLY ADDED++
++++++++++++++++++++++""")
#DELETE BOOKS
elif a==2:
print("AVAILABLE BOOKS...")
[Link]("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:"))
[Link]("select quantity from available_books where
bookname='"+book+"'")
lk=[Link]()
if max(lk)<n:
print(n,"Books are not available!!!!")
else:
[Link]("select bookname from available_books where
bookname='"+book+"'")
log=[Link]()
if log is not None:
[Link]("insert into Sell_rec
values('"+cusname+"','"+str(phno)+"','"+book+"','"+str(n)+"','"+str(price)+"')")
[Link]("update Available_Books set
quantity=quantity-'"+str(n)+"' where BookName='"+book+"'")
[Link]()
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:")
[Link]("select bookname from available_books where
bookname='"+o+"'")
tree=[Link]()
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:")
[Link]("select genre from available_books where
genre='"+g+"'")
poll=[Link]()
if poll is not None:
print("""++++++++++++++++++++
++BOOK IS IN STOCK++
++++++++++++++++++++""")
[Link]("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:")
[Link]("select author from available_books where
author='"+au+"'")
home=[Link]()
if home is not None:
print("""++++++++++++++++++++
++BOOK IS IN STOCK++
++++++++++++++++++++""")
[Link]("select * from available_books where
author='"+au+"'")
for z in mycursor:
print(z)
else:
print("BOOKS OF THIS AUTHOR ARE NOT AVAILABLE!!!!!!!")
[Link]()
#STAFF DETAILS
elif a==4:
print("1:New staff entry")
print("2:Remove staff")
print("3:Existing staff details")
ch=int(input("Enter your choice:"))
#NEW STAFF ENTRY
if ch==1:
fname=str(input("Enter Fullname:"))
gender=str(input("Gender(M/F/O):"))
age=int(input("Age:"))
phno=int(input("Staff phone no.:"))
add=str(input("Address:"))
[Link]("insert into
Staff_details(name,gender,age,phonenumber,address)
values('"+fname+"','"+gender+"','"+str(age)+"','"+str(phno)+"','"+add+"')")
print("""+++++++++++++++++++++++++++++
+STAFF IS SUCCESSFULLY ADDED+
+++++++++++++++++++++++++++++""")
[Link]()
#REMOVE STAFF
elif ch==2:
nm=str(input("Enter staff name to remove:"))
[Link]("select name from staff_details where name='"+nm+"'")
toy=[Link]()
if toy is not None:
[Link]("delete from staff_details where name='"+nm+"'")
print("""+++++++++++++++++++++++++++++++++
++STAFF IS SUCCESSFULLY REMOVED++
+++++++++++++++++++++++++++++++++""")
[Link]()
else:
print("STAFF DOESNOT EXIST!!!!!!")
#EXISTING STAFF DETAILS
elif ch==3:
[Link]("select * from Staff_details")
run=[Link]()
for t in mycursor:
print(t)
if run is not None:
print("EXISTING STAFF DETAILS...")
for t in mycursor:
print(t)
else:
print("NO STAFF EXISTS!!!!!!!")
[Link]()
#SELL HISTORY
elif a==5:
print("1:Sell history details")
print("2:Reset Sell history")
ty=int(input("Enter your choice:"))
if ty==1:
[Link]("select * from sell_rec")
for u in mycursor:
print(u)
if ty==2:
bb=input("Are you sure(Y/N):")
if bb=="Y":
[Link]("delete from sell_rec")
[Link]()
elif bb=="N":
pass
#AVAILABLE BOOKS
elif a==6:
[Link]("select * from available_books order by bookname")
for v in mycursor:
print(v)
#TOTAL INCOME AFTER LATEST UPDATE
elif a==7:
[Link]("select sum(price) from sell_rec")
for x in mycursor:
print(x)
#EXIT
elif a==8:
break
#LOGIN ELSE PART
else:
print("""++++++++++++++++++++++
++INCORRECT PASSWORD++
++++++++++++++++++++++""")
else:
print("""++++++++++++++++++++
++INVALID USERNAME++
++++++++++++++++++++""")
else:
break
OUTPUT:
SIGNUP AND LOGIN
MENU
ADDING BOOK DETAILS
SEARCHING THE BOOKS:
STAFF DETAILS
AVAILABLE BOOK DETAILS
CONCLUSION:
BIBILOGRAPHY:
Computer Science With Python by Sumita Arora for Class 11& 12
HTTPS://[Link]/PYTHON/PYTHON_MYSQL_GETSTARTED
.ASP
HTTPS://[Link]/PYTHON/PYTHON_DATABASE_ACCESS.
HTM HTTPS://[Link]/MYSQL-WITH-PYTHON/