A bank management system program is a software application designed to handle various operations and tasks related to managing bank accounts and customer information. It provides functionality for creating new accounts, performing transactions such as deposits and withdrawals, managing balances, generating reports, and more. The program aims to automate and streamline banking processes, improving efficiency and accuracy.
Key features commonly found in a bank management system program may include:- Account Creation and Management:
- Creating new bank accounts with customer information and initial balances.
- Updating account details such as account holder name, contact information, etc.
- Closing or deactivating accounts.
- Transaction Handling:
- Depositing money into customer accounts.
- Withdrawing money from customer accounts.
- Transferring funds between accounts.
- Managing transaction logs and history.
- Balance and Statement Management:
- Checking and displaying account balances.
- Generating account statements and transaction history.
- Calculating interest or fees associated with accounts.
- Customer Relationship Management:
- Managing customer information, including personal details and account preferences.
- Handling customer inquiries, complaints, and support requests.
- Maintaining a customer database for easy access and retrieval.
- Security and Authentication:
- Implementing secure login and authentication mechanisms.
- Ensuring data privacy and protection.
- Enforcing user roles and access controls to safeguard sensitive information.
- Reporting and Analytics:
- Generating various reports, such as account summaries, ransaction summaries, etc.
- Analyzing customer behavior, trends, and patterns.
- Extracting insights for decision-making and planning.
A bank management system program can be developed as a standalone desktop application, a web-based system, or a part of a larger banking software suite. The program aims to provide bank employees and administrators with the necessary tools and functionalities to efficiently manage customer accounts, transactions, and associated processes.
Source Code
import mysql.connector
#Connect Python With mySQL Database
myDb=mysql.connector.connect(
host="localhost",
username="root",
password="",
database="Banking"
)
Cursor=myDb.cursor()
#Details of A Developer
def developerDetails():
print("\n\n")
print("\t-------------------------------------")
print("\tNAME OF THE STUDENT : Writesourcecode.com")
print("\tPROJECT ON : BANK MANAGEMENT SYSTEM ")
print("\tROLL NO : ")
print("\tSESSION : 2022-23")
print("\t-------------------------------------")
#Details of A BanK
def bankDeatils():
print("\n\n")
print("\t BANK DETAILS ")
print("\t----------------------------")
print("\t NAME OF THE BANK : MONEY PROTECTED BANK")
print("\t IFSC CODE : MPB10005")
print("\t ADDRESS : CHAIBASA ")
print("\t NEW D.A.V PUBLIC SCHOOL")
print("\t MOBILE NO : 1234567890 ")
print("\t----------------------------")
print("\n\n")
#Creating A New Account
def newAccount():
print("\n\n\tCreating a New Account ")
print("\t--------------------------------")
accountNo=int(input("\tAccount No : "))
Name=input("\tName of Account Holder : ")
Address=input("\tAddress : ")
mobile=input("\tMobile No : ")
print("\tType of Account :")
print("\t--------------------------")
print("\t1. Saving Account ")
print("\t2. Current Account")
print("\t--------------------------")
print("\tSelect Your Option : ",end="")
Type=int(input())
initialAmount=float(input("\tInitial Deposite Amount : Rs."))
print("\t--------------------------------\n\n")
Query="insert into Accounts(accountNo,accountholder,address,mobile,types,balance)values(%s,%s,%s,%s,%s,%s)"
if Type==1:
Type="SA"
else:
Type="CA"
Values=(accountNo,Name,Address,mobile,Type,initialAmount)
Cursor.execute(Query,Values)
myDb.commit()
Count=Cursor.rowcount
if Count==1:
print("\tNew Account Created SuccessFully ! ")
else:
print("\tNew Account Created UnSucessFully ! ")
#deposit and withdrawal
def depositAndWithdraw(accNo,value):
Query="select * from accounts where accountNo="+str(accNo)
Cursor.execute(Query)
resultSet=Cursor.fetchone()
if str(resultSet)!='None':
if value==2:
#Withdraw
amount=float(input("\tEnter The Withdraw Amount : "))
if amount<=resultSet[5]:
amount=resultSet[5]-amount
Query="update accounts set balance="+str(amount)+"where accountNo="+str(accNo)
Cursor.execute(Query)
myDb.commit()
print("\tWithDraw SuccessFull ! \n\n")
else:
print("\tInsufficient Balance ")
else:
# Deposite
amount=float(input("\tEnter The Deposite Amount : "))
amount=resultSet[5]+amount
Query="update accounts set balance="+str(amount)+"where accountNo="+str(accNo)
Cursor.execute(Query)
myDb.commit()
print("\tAmount Deposited SuccessFully ! \n\n")
else:
print("\t",accNo,"is Not Available . ")
#Display Account Details
def displayAccountDetails(accNo):
Query="select * from accounts where accountNo="+str(accNo)
Cursor.execute(Query)
resultSet=Cursor.fetchone()
if str(resultSet)!='None':
print("\n")
print("\tBALANCE ENQUIRY ")
print("\t-------------------------")
print("\tAccount No : ",resultSet[0])
print("\tName : ",resultSet[1])
print("\tType : ",resultSet[4])
print("\tBalance : ",resultSet[5])
print("\t-------------------------\n\n")
else:
print("\t",accNo,"is Not Available .")
#Display All The Account Holders Details
def displayAll():
print(end="\n\n")
print("\tAll Accounts Details")
print("\t-------------------------------------------------------------------------------------------")
text=["Account No","Name","Address","Mobile","Acc. Type","Balance"]
print(end="\t")
for i in range(len(text)):
x=text[i].ljust(15)
print(x,end="")
print(end="\n")
print("\t-------------------------------------------------------------------------------------------")
Cursor.execute("select * from accounts")
resultSet=Cursor.fetchall()
for eachRow in resultSet:
print(end="\t")
for eachData in eachRow:
x=str(eachData).ljust(15)
print(x,end="")
print(end="\n")
print("\t-------------------------------------------------------------------------------------------")
print("\tNo of Accounts : ",len(resultSet))
print("\n\n")
#Delete An Existing Account
def deleteAccount(accNo):
Query="select * from accounts where accountNo="+str(accNo)
Cursor.execute(Query)
resultSet=Cursor.fetchone()
if str(resultSet)!='None':
print("\n")
print("\tDELETING ACCOUNT DETAILS ")
print("\t----------------------------")
print("\tAccount No : ",resultSet[0])
print("\tName : ",resultSet[1])
print("\tAddress : ",resultSet[2])
print("\tMobile : ",resultSet[3])
print("\tType : ",resultSet[4])
print("\tBalance : ",resultSet[5])
print("\t----------------------------")
ans=input("\tAre You Sure Want to Delete This Account Y/N : ")
if ans=='y' or ans=='Y':
Query="delete from accounts where accountNo="+str(accNo)
Cursor.execute(Query)
myDb.commit()
print("\tAccount Deleted SucessFully ! ")
else:
print("\tAccount Deletion is Cancel ")
else:
print("\t",accNo,"is Not Available .")
#Modifying An Existing Account
def modifyAccount(accNo):
Query="select * from accounts where accountNo="+str(accNo)
Cursor.execute(Query)
resultSet=Cursor.fetchone()
if str(resultSet)!='None':
print("\n")
print("\tMODIFY ACCOUNT DETAILS ")
print("\t----------------------------")
print("\tAccount No : ",resultSet[0])
print("\tName : ",resultSet[1])
print("\tAddress : ",resultSet[2])
print("\tMobile : ",resultSet[3])
print("\tType : ",resultSet[4])
print("\tBalance : ",resultSet[5])
print("\t----------------------------")
ans=input("\tAre You Sure Want to Modify This Account Y/N : ")
if ans=='y' or ans=='Y':
print("\tModifying a New Account ")
print("\t--------------------------------")
accountNo=int(input("\tAccount No : "))
Name=input("\tName of Account Holder : ")
Address=input("\tAddress : ")
mobile=input("\tMobile No : ")
print("\tType of Account :")
print("\t--------------------------")
print("\t1. Saving Account ")
print("\t2. Current Account")
print("\t--------------------------")
print("\tSelect Your Option : ",end="")
Type=int(input())
initialAmount=float(input("\tInitial Deposite Amount : Rs."))
print("\t--------------------------------")
Query="insert into Accounts(accountNo,accountholder,address,mobile,types,balance)values(%s,%s,%s,%s,%s,%s)"
if Type==1:
Type="SA"
else:
Type="CA"
delQuery="delete from accounts where accountNo="+str(accNo)
Cursor.execute(delQuery)
Values=(accountNo,Name,Address,mobile,Type,initialAmount)
Cursor.execute(Query,Values)
myDb.commit()
print("\tAccount Modify SucessFully ! \n\n")
else:
print("\tAccount Modification is Cancel \n\n")
else:
print("\t",accNo,"is Not Available .\n\n")
# Main Program
developerDetails()
val=input("\tPress Any Key To Continue : ")
print("\n\n\n")
while True:
print("\tMAIN MENU")
print("\t--------------------------")
print("\t1. BANK DETAILS")
print("\t2. NEW ACCOUNT")
print("\t3. DEPOSIT AMOUNT")
print("\t4. WITHDRAW AMOUNT")
print("\t5. BALANCE ENQUIRY")
print("\t6. ALL ACCOUNT HOLDER LIST")
print("\t7. CLOSE AN ACCOUNT")
print("\t8. MODIFY AN ACCOUNT")
print("\t9. EXIT")
print("\t--------------------------")
print("\n\tSelect Your Option (1-8) :",end="")
ch = int(input())
if ch==1:
bankDeatils()
elif ch == 2:
newAccount()
elif ch==3:
accNo = int(input("\tEnter The account No. : "))
depositAndWithdraw(accNo, 1)
elif ch== 4:
accNo = int(input("\tEnter The account No. : "))
depositAndWithdraw(accNo, 2)
elif ch== 5:
accNo = int(input("\tEnter The account No. : "))
displayAccountDetails(accNo)
elif ch== 6:
displayAll()
elif ch== 7:
accNo =int(input("\tEnter The account No. : "))
deleteAccount(accNo)
elif ch== 8:
accNo = int(input("\tEnter The account No. : "))
modifyAccount(accNo)
elif ch== 9:
print("\tThanks for using Bank Management System")
break
else :
print("Invalid choice")