Updated Project Format
Updated Project Format
Project Synopsis
Introduction
This project introduces a software system for Hotel Management. It simplifies the management of rooms, customer details,
AIM
To demonstrate programming knowledge by developing a real-world application that streamlines hotel management throug
Idea Source
With the growing demand for digital solutions, the manual management of hotels has become outdated. This project ensure
Bal Bhavan Public School, New Delhi
__________________
Computer Science Teacher
Date: ____________
Project: BANK MANAGEMENT SYSTEM Page:# 3/19
Acknowledgement
● This project is all about software for the Bank management system. It helps to have a full-
fledged control over his/her account.
● The system we have developed is perfect for a person trying to access their bank account and
also for bank executive to edit details. From an admin point of view, we have added
accessibilities like adding new accounts, editing existing accounts, sorting account in a particular
way, deleting rows in a particular column or a group of rows and searching a particular account.
From a user perspective, we have added a safe password encryption which uses our ‘password’
database made for this sole purpose. Users can also easily check their balances or do transactions
in simple and easy steps.
AIM
● The objective of this project is to let us apply programming knowledge into a real- world
situation/problem and expose how programming skills help in developing a good software.
Idea Source
● Today one cannot afford to rely on the fallible human beings who really want to stand against
today’s merciless competition where not too wise saying “to err is human” is no longer valid, it’s
outdated to rationalize your mistake. So, to keep pace with time, to bring about the best result
without malfunctioning and greater efficiency so to replace the unending heaps of flies with a
much sophisticated hard disk of the computer.
● Moreover as in the recent years lifestyles become faster, people want to eliminate things that
take a major amount of time, like waiting in a queue at the bank. Hence there is a major demand
for safe and convenient ways to access banking facilities from anywhere.
● One has to use the data management software. Software has been an ascent in atomization in
various organizations. Many software products working are now in markets, which have helped in
making the organizations work easier and efficiently. Data management initially had to maintain
a lot of ledgers and a lot of paperwork had to be done but now software products in this
organization have made their work faster and easier. Now only this software has to be loaded on
the computer and work can be done.
● This prevents a lot of time and money. The work becomes fully automated and any information
regarding the organization can be obtained by clicking the button. Moreover, now it’s an age of
computers and automating such an organization gives a better look.
TABLE : ACCOUNTS
Menu Options :
DISPLAY ACCOUNTS
EDITTING IN AN ACCOUNT
SORTING ACCOUNTS
CHECK BALANCE
Project: BANK MANAGEMENT SYSTEM Page:# 6/19
Validation and Add on Features
● In case the user enters any wrong input, we will ask them to retry. The coding will be user
friendly and the users will find everything comfortable. We have some special things for some
people which will be described properly in the coding.
Project: BANK MANAGEMENT SYSTEM Page:# 7/19
SOURCE CODE
# Project Title : <BANK MANAGEMENT SYSTEM>
# Version : 1.0 2023-2024
# Developed By : <PRATHAM SHARMA, BHARAT AGGARWAL, KSHITIZ GAUR>
# Guide : <ARTI MEHRA>
# Last Updated On: <2023-10-03>
# Global Variables
passwrd = None
db = None
C = None
def base_check():
check=0
db = pymysql.connect(host="localhost", user="root", password=passwrd)
cursor = db.cursor()
cursor.execute('Show databases')
Result=cursor.fetchall()
for r in Result:
for i in r:
if i=='bank':
cursor.execute('Use bank')
check=1
if check!=1:
create_database()
def table_check():
db = pymysql.connect(host="localhost", user="root", password=passwrd)
cursor = db.cursor()
cursor.execute('Show databases')
Result=cursor.fetchall()
for r in Result:
for i in r:
if i=='bank':
cursor.execute('Use bank')
cursor.execute('show tables')
result=cursor.fetchall()
if len(result)<=1:
create_tables()
else:
print(' Booting systems...')
Project: BANK MANAGEMENT SYSTEM Page:# 8/19
def create_database():
try:
db = pymysql.connect(host="localhost", user="root", password=passwrd)
cursor = db.cursor()
cursor.execute("CREATE DATABASE IF NOT EXISTS bank")
db.commit()
db.close()
try:
print("Database 'bank' created successfully.")
except:
print(f"Error creating database: {str(e)}")
except pymysql.Error as e:
print(f"Error creating database: {str(e)}")
def create_tables():
try:
db = pymysql.connect(host="localhost", user="root", password=passwrd,
database="bank")
cursor = db.cursor()
def QR():
Result = C.fetchall()
for r in Result:
print(r)
Project: BANK MANAGEMENT SYSTEM Page:# 9/19
def CReg():
N = input("Enter Name: ")
AC = random.randint(100000,999999)
BB = float(input("Enter Initial Bank Balance: "))
if BB>1000:
PP = input("Enter Account Password:")
data = (N, AC, BB)
adata = (N, AC, PP)
ldata = (N, AC, 'NO', 0, 0, 0, 0)
SQL = "INSERT INTO accounts (NAME, ACNO, BBALANCE) VALUES (%s, %s, %s)"
SQL2 = "INSERT INTO password (NAME, ACNO, PASSWORD) VALUES (%s, %s, %s)"
try:
C.execute(SQL, data)
C.execute(SQL2, adata)
db.commit()
print('Account successfully created...')
print('Your Account details:',data,'Please save this information to
avail future services')
except pymysql.Error as e:
print(f"Error generated: {str(e)}")
else:
print('Balance below minimum Limit...Minimum Deposit Required!')
CReg()
def D():
def Sort():
Sort_On = input("SORT ON[NAME,ACNO, BBALANCE]::: ")
AOD = input("Asc: Ascending Order , Desc: Descending Order:::")
SQL = "SELECT * FROM ACCOUNTS ORDER BY " + Sort_On + " " + AOD
try:
C.execute(SQL)
QR()
except:
print("Wrong Column or Order")
def Search():
Search_on = input("SEARCH ON[ACNO OR NAME]:::")
if Search_on =='NAME':
VAL = input("Search Value:")
SQL = "SELECT * FROM ACCOUNTS WHERE " + Search_on + " = " + "'" + VAL + "'"
elif Search_on =='ACNO':
VAL = input("Search Value:")
SQL = "SELECT * FROM ACCOUNTS WHERE " + Search_on + " = " + VAL
try:
C.execute(SQL)
print("RECORD FOUND")
QR()
except:
print("Value not found or Incorrect Search_on Value")
Project: BANK MANAGEMENT SYSTEM Page:# 10/19
def Delete():
Col = input("Column[NAME,ACNO,BBALANCE]:::")
if Col=='NAME':
Val = input("Value:::")
SQL = "DELETE FROM ACCOUNTS WHERE " + Col + " " + "=" + " " + Val
else:
Sign = input("Comparison Value[>,=,<(etc.)]:::")
Val = input("Value:::")
SQL = "DELETE FROM ACCOUNTS WHERE " + Col + " " + Sign + " " + Val
try:
C.execute(SQL)
D()
except:
print("Wrong Input Values or Record Not found")
def Edit():
while True:
Set_Col = input("SET Column[NAME,ACNO,BBALANCE]:::")
Set_Condition = input("SET CONDITION: ")
Where_Col = input("WHERE Column[NAME,ACNO,BBALANCE]:::")
Where_Condition = input("Where CONDITION: ")
SQL = "UPDATE ACCOUNTS SET " + Set_Col + Set_Condition + " WHERE " +
Where_Col + " " + Where_Condition
print(SQL)
Con = input("Confirm(Y/N): ")
if Con=='Y':
C.execute(SQL)
D()
break
else:
print("Try Again")
Project: BANK MANAGEMENT SYSTEM Page:# 11/19
def Transact():
db = pymysql.connect(host="localhost", user="root", password=passwrd,
database="bank")
cursor = db.cursor()
while True:
print("Select W :withdrawing, D :depositing, X:EXIT::: ")
a=input()
Acno=(input('RE-ENTER YOUR ACCOUNT NO.:'))
SQL= "select BBALANCE from accounts where Acno" + "=" + Acno
cursor.execute(SQL)
Result=cursor.fetchall()
for i in Result:
for j in i:
money=j
print(Result)
if a=="W":
N=int(input("enter the amount you want to withdraw"))
if (money-N)>=1000.0:
SQL = "UPDATE ACCOUNTS SET BBALANCE= BBALANCE-"+" " +str(N)+ " " +
"WHERE ACNO=" + " " + Acno
C.execute(SQL)
print('TRANSACTION SUCCESSFULL')
Check()
db.commit()
break
else:
print('Minimum Deposit Limit breched... \n Transaction failed')
elif a=="D":
M=int(input("enter the amount you want to deposit"))
SQL = "UPDATE ACCOUNTS SET BBALANCE= BBALANCE+" + " " + str(M) + " " +
"WHERE ACNO=" + " " + Acno
C.execute(SQL)
print('TRANSACTION SUCCESSFULL')
Check()
db.commit()
break
elif a=='X':
break
else:
print("Wrong input, try again")
def Check():
Acno=(input('ENTER YOUR ACCOUNT NO. TO CHECK YOUR BALANCE:'))
SQL= 'SELECT BBALANCE FROM ACCOUNTS WHERE ACNO='+Acno ;
C.execute(SQL)
QR()
Project: BANK MANAGEMENT SYSTEM Page:# 12/19
# Main Code
def main():
global passwrd
passwrd = input("Enter password for mysql: ")
global db, C
db = pymysql.connect(host="localhost", user="root", password=passwrd,
database="bank")
C = db.cursor()
while True:
Log = input("For Bank Employees : A, For User : U ::: ")
if Log == "A" or Log == 'a':
P = input("ENTER PASSWORD: ")
if P == '12345':
print("LOGIN SUCCESSFUL")
while True:
AMenu = input('''C:Customer Registration, D:Display
Accounts,S:Sort,SE:Search,DEL:Delete,X:Break :::''')
if AMenu == 'C':
CReg()
elif AMenu == 'D':
D()
elif AMenu =='S':
Sort()
elif AMenu =='SE':
Search()
elif AMenu =='DEL':
Delete()
elif AMenu == 'E':
Edit()
elif AMenu == 'X':
break
else:
print("Wrong Input")
main()
OUTPUT
Admin Controls
Customer Registration
Display Accounts
User Controls
Register
Withdraw
Project: BANK MANAGEMENT SYSTEM Page:# 16/19
Deposit
Check Balance
Project: BANK MANAGEMENT SYSTEM Page:# 17/19
Hardware Requirement
PC/Laptop/MacBook with Intel
core/i3/i5/i7 or any equivalent
With at least 2 GB RAM 10 MB
free space on Hard
Disk LCD/LED
and/or
MySQL 8.x
Project: BANK MANAGEMENT SYSTEM Page:# 18/19
References
1.Classnotes
2.www.w3schools.com
3.www.geekforgeeks.com
Project: BANK MANAGEMENT SYSTEM Page:# 19/19