COMPUTER PROJECT BANK MANAGEMENT SYSTEM
COMPUTER PROJECT BANK MANAGEMENT SYSTEM
_______________ _______________
Teacher In-charge External examiner
________
Principal School Rubber Stump
ACKNOWLEDGEMENT
The success and final outcome of this project required a
lot of guidance and assistance from many people and I am
extremely fortunate to have got this all along the completion
of my project. Whatever I have done this only due to such
guidance and assistance and I would not forget to thank them.
I respect and thank Mr. Sudipta Das, for giving me an such
opportunity to do this project and providing us all support and
guidance which made me complete the project on time. I
would also like to express my gratitude towards Mr. Sudipta
Das, for helping me in conducting practicals for this project.
Last but not the least I would like thank all my friends who
supported me all the way and my parents who helped me
financially and encouraged me throughout in the completion
of project.
HARDWARES &
SOFTWARES REQUIRED
HARDWARES
1. Desktop Computer / Laptop
2. Windows 10 / Windows 11
SOFTWARES
1. Python
2. MySQL
3. Python Connector Module
INDEX
SR.NO TOPIC PAGE NO
- BANK MANAGEMENT SYSTEM -
I. INTRODUCTION 1-3
II. SOURCE CODE 4-23
III. TABLES IN DATABASE 24-29
IV. OUTPUT 30-37
V. BIBLIOGRAPHY 38
INTRODUCTION
The project Bank Management System presented here
represents a pivotal solution in the realm of financial
management, blending the sophistication of MySQL as the
database backend with the dynamic capabilities of Python.
This amalgamation results in a comprehensive system that
caters to both administrative and user functionalities,
streamlining processes related to account management,
feedback collection, and loan tracking.
Evolution of Management Systems using Python and
MySQL Connector:
The evolution of management systems, especially in the
banking sector, has witnessed a paradigm shift with the
advent of powerful programming languages like Python and
robust database management systems such as MySQL.
Python, recognized for its simplicity, readability, and
versatility, serves as the ideal frontend language for
developing user-friendly interfaces. MySQL, on the other hand,
provides a reliable and scalable database solution, ensuring
the secure storage and retrieval of crucial banking
information.
The integration of these technologies facilitates a seamless
flow of data, enabling real-time interactions between users
and the banking system. The dynamic connectivity offered by
1
the MySQL Python Connector ensures efficient communication
between the Python application and the MySQL database.
Purpose of the Bank Management System:
The Bank Management System project aims to address several
key challenges in traditional banking operations. By leveraging
Python's intuitive programming features and MySQL's robust
data management capabilities, the system provides an agile
and user-centric platform for both customers and
administrators.
User Functions:
• Add Account: Users can easily open new accounts by
providing essential details, streamlining the account creation
process.
• View Balance: Account holders can check their account
balance in real-time, fostering transparency and financial
awareness.
• Give Feedback: The system facilitates a channel for users
to provide feedback, ensuring continuous improvement based
on user input.
• View Transaction History: Users have access to their
transaction history, aiding in financial record-keeping and
reconciliation.
P.T.O
2
Admin Functions:
• Add New Accounts: Administrators can add new
accounts to the system, streamlining the process of on
boarding new customers.
• View Loan Details: Admin have access to
comprehensive loan details, enabling effective management
and decision-making.
• Update Loan Status: The system empowers
administrators to update the status of loans, tracking
repayments and ensuring accurate record-keeping.
• View Loan Defaulters: Admin can identify and view
details of customers who have defaulted on loan payments
for a specified period.
• View User Feedback: The system consolidates user
feedback, providing valuable insights into user experiences
and concerns.
3
SOURCE CODE
#BANK MANAGEMENT SYSTEM
#IMPORTING MYSQL IN PYTHON
#CONNECTING MYSQL IN PYTHON
#IMPORT random FUNCTION FROM BUILT_IN
FUNCTION
import mysql.connector as con
import random
print("\t----------WELCOME TO BANK
MANAGEMENT SYSTEM----------")
print("")
#TO VIEW DATA OF THE USER
def view_data():
dbo=con.connect(host="localhost" ,
user="root" , password="Avirup@2007" ,
database="bank_management_system")
cu=dbo.cursor()
number=int(input("Enter the account
number: "))
query="select * from acct_holder
where acct_no={}".format(number)
cu.execute(query)
4
for data in cu:
print("**********************************
************************************")
print("Account number: ",
data[0])
print("Name of account holder:
",data[1])
print("Phone number: ",data[2])
print("Email: ",data[3])
print("Address: ",data[4])
print("Initial balance:
",data[5])
print("Loan token: ",data[6])
print("**********************************
************************************")
n=int(input("""Enter 1 for user
menu:
Enter 2 for
exit:"""))
if n == 1:
user1()
if n == 2:
return
5
#TO CHANGE THE NAME OF THE USER
def update_name():
dbo=con.connect(host="localhost" ,
user="root" , password="Avirup@2007" ,
database="bank_management_system")
cu=dbo.cursor()
holder=input("Enter the updated name:
")
number=int(input("Enter the account
number: "))
query="update acct_holder set
acct_holder_name('{}') where acct
no={}".format(holder,number)
cu.execute(query)
dbo.commit()
print("------------------------------
-----------------------------------------
")
n=int(input("""Enter 1 for user menu:
Enter 2 for
exit:"""))
print("Name successfully updated")
if n == 1:
user1()
if n == 2:
6
return
#TO CHANGE THE EMAIL OF THE USER
def update_EMAIL():
dbo=con.connect(host="localhost" ,
user="root" , password="Avirup@2007" ,
database="bank_management_system")
cu=dbo.cursor()
email=input("Enter the updated email:
")
number=int(input("Enter the account
number: "))
query="update acct_holder set
email='{}' where acct
no={}".format(email,number)
cu.execute(query)
dbo.commit()
print("------------------------------
-----------------------------------------
")
n=int(input("""Enter 1 for user menu:
Enter 2 for
exit:"""))
print("Email successfully updated")
if n == 1:
user1()
7
if n == 2:
return
#TO CAHNGE THE PHONE NUMBER OF THE USER
def update_phone_number():
dbo=con.connect(host="localhost" ,
user="root" , password="Avirup@2007" ,
database="bank_management_system")
cu=dbo.cursor()
phone=input("Enter the updated phone
number: ")
number=int(input("Enter the account
number: "))
query="update acct_holder set
phone_number={} where acct
no={}".format(phone,number)
cu.execute(query)
dbo.commit()
print("------------------------------
-----------------------------------------
")
n=int(input("""Enter 1 for user menu:
Enter 2 for
exit:"""))
print("Phone number successfully
updated")
8
if n == 1:
user1()
if n == 2:
return
#TO CHANGE THE ADDRESS OF THE USER
def update_address():
dbo=con.connect(host="localhost" ,
user="root" , password="Avirup@2007" ,
database="bank_management_system")
cu=dbo.cursor()
address=input("Enter the updated
address: ")
number=int(input("Enter the account
number: "))
query="update acct_holder set
address='{}' where acct
no={}".format(address,number)
cu.execute(query)
dbo.commit()
print("------------------------------
-----------------------------------------
")
n=int(input("""Enter 1 for user menu:
Enter 2 for
exit:"""))
9
print("Address was successfully
updated")
if n == 1:
user1()
if n == 2:
return
#TO GIVE FEEDBACK TO THE BANK
def give_feedback():
dbo=con.connect(host="localhost" ,
user="root" , password="Avirup@2007" ,
database="bank_management_system")
cu=dbo.cursor()
number=int(input("Enter the account
number: "))
print("**********Enter your
feedback**********")
feed=input("")
query="insert into feedback
values('{}',{})".format(feed,number)
cu.execute(query)
dbo.commit()
print("------------------------------
-----------------------------------------
")
n=int(input("""Enter 1 for user menu:
10
Enter 2 for
exit:"""))
print("Thank you for your feedback")
if n == 1:
user1()
if n == 2:
return
#TO VIEW LOAN STATUS OF THE USER BY ADMIN
def view_loan_status():
number=int(input("Enter the account
number: "))
dbo=con.connect(host="localhost" ,
user="root" , password="Avirup@2007" ,
database="bank_management_system")
cu=dbo.cursor()
query="select * from loan_acct where
acct no={}".format(number)
cu.execute(query)
for data in cu:
print(cu)
number.commit()
print("------------------------------
-----------------------------------------
")
n=int(input("""Enter 1 for user menu:
11
Enter 2 for
exit:"""))
if n == 1:
user1()
if n == 2:
return
#TO ADD DATA OF A NEW USER
def add_data():
dbo=con.connect(host="localhost" ,
user="root" , password="Avirup@2007" ,
database="bank_management_system")
cu=dbo.cursor()
a=random.random()*100000000000
n=input("Enter the name of the
account holder: ")
p=int(input("Enter the phone number:
"))
e=input("Enter the email of account
holder: ")
ad=input("Enter the address of
account holder: ")
b=int(input("Enter the balance: "))
t=input("Enter wheather loan taken or
not: ")
12
query="insert into acct_holder
values({},'{}',{},'{}','{}',{},'{}')".for
mat(a,n,p,e,ad,b,t)
cu.execute(query)
dbo.commit()
print("------------------------------
-----------------------------------------
")
print("Successfully new account was
added")
print("------------------------------
-----------------------------------------
")
#TO SEE FEEDBACKS OF THE USER
def view_feedback():
dbo=con.connect(host="localhost" ,
user="root" , password="Avirup@2007" ,
database="bank_management_system")
cu=dbo.cursor()
query="select * from feedback"
cu.execute(query)
for data in cu:
print("**********************************
************************************")
13
print("Account number: ",
data[0])
print("Feedback: ",data[1])
print("**********************************
************************************")
#TO VIEW THE LOAN DETAILS OF THE USER
def view_loan_details():
dbo=con.connect(host="localhost" ,
user="root" , password="Avirup@2007" ,
database="bank_management_system")
cu=dbo.cursor()
query="select * from loan_acct"
cu.execute(query)
for data in cu:
print("**********************************
************************************")
print("Account number: ",
data[0])
print("Account holder name:
",data[1])
print("Loan taken: ",data[2])
print("Type of loan: ",data[3])
print("Status of loan: ",data[4])
14
print("Number of months from
which loan's interest not paid:
",data[5])
print("**********************************
************************************")
#TO CHANGE THE LOAN STATUS OF THE USER
def update_status_loan():
dbo=con.connect(host="localhost" ,
user="root" , password="Avirup@2007" ,
database="bank_management_system")
cu=dbo.cursor()
number=int(input("Enter the account
number: "))
stat=input("Enter the status of the
loan cleared or pending: ")
query="update loan_acct set status of
loan=('{}')".format(stat,number)
cu.execute(query)
dbo.commit()
print("------------------------------
-----------------------------------------
")
print("Successfully updated loan
status")
15
print("------------------------------
-----------------------------------------
")
#TO CHECK THE LOAN DEFAULTERS
def status_loan_defaulters():
dbo=con.connect(host="localhost" ,
user="root" , password="Avirup@2007" ,
database="bank_management_system")
cu=dbo.cursor()
m=int(input("Enter the number of
months: "))
query="select * from loan_acct where
number_of_months_from_which_interest_is_n
ot_paid>={}".format(m)
cu.execute(query)
for data in cu:
print("**********************************
************************************")
print("Account number: ",
data[0])
print("Account holder name:
",data[1])
print("Loan taken: ",data[2])
print("Type of loan: ",data[3])
print("Status of loan: ",data[4])
16
print("Number of months from
which loan's interest not paid:
",data[5])
print("**********************************
************************************")
#TO ADD NEW DATA FOR LOAN
def add_data():
dbo=con.connect(host="localhost" ,
user="root" , password="Avirup@2007" ,
database="bank_management_system")
cu=dbo.cursor()
a=int(input("Enter the account
number: "))
n=input("Enter the name of the
account holder: ")
p=int(input("Enter the amount of loan
taken: "))
e=input("Enter the type of loan: ")
ad=input("Enter the status of loan:
")
b=int(input("Enter the number of
months from which loan's interest not
paid: "))
17
query="insert into loan_acct
values({},'{}',{},'{}','{}',{})".format(a
,n,p,e,ad,b)
cu.execute(query)
dbo.commit()
print("------------------------------
-----------------------------------------
")
print("Successfully added loan data")
print("------------------------------
-----------------------------------------
")
#ADNIM MENU
def admin():
while true:
print("**********WELCOME ADMIN TO
BANK MANAGEMENT SYSTEM**********")
print("Enter 1 adding the data of
new accounts:")
print("Enter 2 for viewing data
of account holder's loan:")
print("Enter 3 for updating
status of loan lend:")
print("Enter 4 for viewing
details of loan defaulters:")
18
print("Enter 5 for viewing
feedback of users:")
print("Enter 6 adding the data of
new accounts into loan accounts:")
print("Enter 7 for exiting:")
print("--------------------------
-----------------------------------------
----")
print("--------------------------
-----------------------------------------
----")
ch=int(input("Enter your
choice"))
if ch == 1:
add_data()
elif ch == 2:
view_loan_details()
elif ch == 3:
update_loan_status()
elif ch == 4:
status_loan_defaulters()
elif ch == 5:
view_feedback()
elif ch == 6:
add_data_loan()
19
else:
break
#USER MENU
def user1():
print("------------------------------
-----------------------------------------
")
print("\t**********WELCOME ADMIN TO
BANK MANAGEMENT SYSTEM**********")
print("")
print("--------------------WELCOME
USER MENU--------------------")
print("Enter 1 for viewing your bank
account data:")
print("Enter 2 for updating the
name:")
print("Enter 3 for updating the
email:")
print("Enter 4 for updating the phone
number:")
print("Enter 5 for updating the
address:")
print("Enter 6 for giving feedback:")
print("Enter 7 for viewing the staus
of your loan:")
20
print("------------------------------
-----------------------------------------
")
print("------------------------------
-----------------------------------------
")
ch=int(input("Enter your choice"))
if ch == 1:
view_data()
elif ch == 2:
update_name()
elif ch == 3:
update_email()
elif ch == 4:
update_phone_number()
elif ch == 5:
update_address()
elif ch == 6:
give_feedback()
elif ch == 7:
view_loan_status()
#MAIN MENU
print("**********MAIN MENU**********")
print("_____________________________")
21
print("Enter 1 to open for admin.")
print("Enter 2 to open for user.")
print("Enter 3 for exit.")
print("-----------------------------")
inp=int(input("Enter your choice: "))
if inp == 1:
print("Enter username: ")
user=input("")
print("Enter password: ")
pasw=input("")
print("-----------------------------
")
dbo=con.connect(host="localhost" ,
user="root" , password="Avirup@2007" ,
database="bank_management_system")
cu=dbo.cursor()
query="select * from admin_data"
cu.execute(query)
for data in cu:
if data[0] == user and data[1] ==
pasw:
admin()
if inp == 2:
print("Enter username: ")
22
user=input("")
print("Enter password: ")
pasw=input("")
print("-----------------------------
")
dbo=con.connect(host="localhost" ,
user="root" , password="Avirup@2007" ,
database="bank_management_system")
cu=dbo.cursor()
query="select * from user_data"
cu.execute(query)
for data in cu:
if data[0] == user and data[1] ==
pasw:
user1()
if inp == 3:
print("Thank you!")
exit()
23
24
TABLES IN DATABASE
• USE OF DATABASE AND SHOW ALL TABLE IN
DATABASE:
25
• DESCRIBE ADMIN TABLE:
26
• SHOW FEEDBACK OF USER:
27
• DESCRIBE TRANSACTION TABLE:
28
• DATA IN USER TABLE:
29
OUTPUT
• MAIN MENU:
• ADMIN MENU:
P.T.O
30
• ADDING THE DATA OF NEW ACCOUNT:
31
• FOR UPDATING STATUS OF LOAN LEND:
32
• FOR VIEWING FEEDBACK OF USERS:
33
• USER MENU:
P.T.O
34
• FOR UPDATING THE NAME:
35
• FOR UPDATING THE PHONE NUMBER:
36
• FOR GIVING FEEDBACK:
37
BIBLIOGRAPHY
For successfully completing my project file. I have taken help
from the following applications:
• Python
• MySQL
• MS Word
38