DAV PUBLIC SCHOOL , BISTUPUR , JAMSHEDPUR
PROJECT REPORT ON
BANK MANAGEMENT SYSTEM
ROLL NO :
NAME : SHYAM SRIDUTT BALAMURUGAN
CLASS : XII – A1
SUBJECT : COMPUTER SCIENCE
SUB CODE : 083
PROJECT GUIDE: MRS. JAYA MAM
PGT (CS)
DAV PUBLIC SCHOOL , BISTUPUR ,
JAMSHEDPUR
1
CERTIFICATE
This is to certify that NAME- Shyam Sridutt
Balamurugan Board Roll No:
has successfully completed the project Work
entitled BANK
MANAGEMENT SYSTEM in partial fulfillment of
Computer Science Practical Examination(083)
prescribed by CBSE for AISSCE-2024 conducted by
CENTRAL BOARD OF SECONDARY EDUCATION,
NEW DELHI.
2
Internal Examiner External Examiner
Date Date
3
TABLE OF CONTENTS [ T O C ]
SER DESCRIPTION PAGE NO
1 ACKNOWLEDGEMENT
2 INTRODUCTION
3 OBJECTIVES OF THE PROJECT
4 PROPOSED SYSTEM
5 HARDWARE AND SOFTWARE REQUIREMENTS
6 DATA DICTIONARY
7 MENU TREE
8 SOURCE CODE
9 SQL TABLES
10 OUTPUT
11 BIBLIOGRAPHY
4
ACKNOWLEDGEMENT
I would like to express my deepest gratitude to all those
who have helped me complete this school project
successfully.
I am extremely thankful to my project guide, Mrs JAYA
CHAKRABORTY, my Computer teacher, for invaluable
guidance, encouragement and support throughout this
project.
I am grateful to our school Principal,Mrs PRAGYA
SINGH for providing us the resources and facilities to
enable our project work. She took keen interest in my
project and motivated me to give my best efforts.
My special thanks to my family, they encouraged me at
every step, and helped me manage my time effectively.
Their faith in my abilities inspired me to take on this
project.
I could not have completed this project successfully
without the support of all these people. I will always be
indebted for everything they have done for me.
5
BANK MANAGEMENT SYSTEM
INTRODUCTION
A bank is a financial institution which accepts deposits, pays interest
on predefined rates, clears checks, makes loans, and often acts as an
intermediary in financial transactions. It also provides other financial
services to its customers.
Bank management governs various concerns associated with bank in
order to maximize profits. The concerns broadly include liquidity
management, asset management, liability management and capital
management.
This Python project is a simple Bank Management System that
simulates creating and managing bank accounts. It allows users to
create accounts, deposit or withdraw funds, and check their balance.
The Bank class holds the bank’s data (clients, bank name) and
contains methods to update the list of clients and authenticate users
based on their name, account number, and [Link] Client class
holds individual client details such as account number, balance, and
password. It also has methods to deposit, withdraw, and check the
[Link] main() function is the driver code that provides a menu
interface for the user to interact with the system.
The Bank Management system is essential for managing financial
transactions and maintaining customer records.
6
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.
• Write programs utilizing modern software tools.
• Apply object oriented programming principles
effectively when developing small to medium sized
projects.
• Write effective procedural code to solve small to medium
sized problems.
• Students will demonstrate a breadth of knowledge in
computer science, as exemplified in the areas of systems,
theory and software development.
• 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.
7
PROPOSED SYSTEM
One has to use the data management software. Software
has been an ascent in atomization various organisations. 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 paper work has to be done but now software product
on this organization has 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 of and automating such an
organization gives the better look.
8
HARDWARE AND SOFTWARE REQUIREMENTS
I. OPERATING SYSTEM : WINDOWS 7 AND ABOVE
II. PROCESSOR : PENTIUM(ANY) OR AMD
ATHALON(3800+- 4200+
DUAL
CORE)
III. MOTHERBOARD : 1.845 OR 915,995 FOR PENTIUM 0R
MSI
K9MM-V VIA K8M800+8237R PLUS
CHIPSET FOR AMD ATHALON
IV. RAM : 512MB+
V. Hard disk : SATA 40 GB OR ABOVE
VI. CD/DVD r/w multi drive combo: (If back up required)
VII. MONITOR 14.1 or 15 -17 inch
VIII. Key board and mouse
IX. Printer
SOFTWARE REQUIREMENTS:
• Windows OS
• Python
• MS WORD
9
Menu Tree
10
SOURCE CODE
FILENAME:[Link]
import pymysql as cnt
import csv
import sys
import random
# Database connection
mydb = [Link](host="localhost", user="root",
password="mysql", database="data")
mycursor = [Link]()
# Ensure database exists
[Link]('CREATE DATABASE IF NOT EXISTS data')
[Link]('USE data')
# Function to generate transaction ID
def generate_transaction_id():
return [Link](100000, 999999)
11
# USERS SECTION
def create_user():
[Link]('''CREATE TABLE IF NOT EXISTS user
( bankid INT NOT NULL PRIMARY KEY,
name VARCHAR(50) NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
age INT NOT NULL,
bank_balance DECIMAL(10, 2) NOT NULL,
pin INT NOT NULL)''')
print("Table created")
[Link]("DESCRIBE user")
result = [Link]()
for i in result:
print(i)
def entry_user():
while True:
a = int(input("Enter 4 digit unique bankid of the new
user: "))
b = input("Enter name of person: ")
c = input("Enter email address of the user: ")
d = int(input("Enter user's age: "))
e = float(input("Enter the money deposited by the user:
"))
f = int(input("Enter your pin XXXX: "))
12
qu = 'INSERT INTO user (bankid, name, email, age,
bank_balance, pin) VALUES (%s, %s, %s, %s, %s, %s)'
values = (a, b, c, d, e, f)
[Link](qu,
values) [Link]()
print("Account created")
ch = input("Want to enter more records y /n: ")
if ch in "Nn":
break
def show_all_user():
[Link]("SELECT * FROM user")
result = [Link]()
for i in result:
print(i)
def show_specific_user():
ch = int(input("Enter bankid to search: "))
query = "SELECT * FROM user WHERE bankid = %s"
[Link](query, (ch,))
result = [Link]()
for i in result:
print(i)
def age_user():
print("Details of range of age groups")
13
n = input("Enter lower limit age: ")
m = input("Enter upper limit age: ")
[Link]("SELECT * FROM user WHERE age BETWEEN %s
AND %s", (n, m))
for x in mycursor:
print(x)
def Del_rec_user():
n = int(input("Enter bankid: "))
[Link]("DELETE FROM user WHERE bankid = %s", (n,))
[Link]()
print("Record with bankid ", n, " is deleted")
def update_user():
a = int(input("Enter the bankid of the person to update: "))
print(f"Updating record for bankid: {a}")
name = input("Enter new name (leave blank to skip): ")
email = input("Enter new email (leave blank to skip): ")
age = input("Enter new age (leave blank to skip): ")
bank_balance = input("Enter new bank balance (leave blank
to skip): ")
pin = input("Enter new pin (leave blank to skip): ")
update_fields = []
values = []
14
if name:
update_fields.append("name = %s")
[Link](name)
if email:
update_fields.append("email = %s")
[Link](email)
if age:
update_fields.append("age = %s")
[Link](int(age))
if bank_balance:
update_fields.append("bank_balance = %s")
[Link](float(bank_balance))
if pin:
update_fields.append("pin = %s")
[Link](pin)
if not update_fields:
print("No valid fields provided to update.")
return
query = f"UPDATE user SET {', '.join(update_fields)} WHERE
bankid = %s"
[Link](a)
[Link](query, tuple(values))
[Link]()
15
print(f"Record with bankid {a} updated successfully.")
def view_transactions():
print("Transactions of a particular Bankid")
b = input("Enter bankid to search transactions: ")
print("Your csv file with all details of transactions of
bankid", b, "is created")
query = """
SELECT transaction_id, from_bankid, to_bankid, amount, date
FROM transactions
WHERE from_bankid = %s OR to_bankid = %s
"""
file = open('trans_history.csv', 'w')
fw = [Link](file)
[Link](["transaction_id", "bankid_from", "bankid_to",
"amount", "remarks"])
[Link](query, (b, b))
t = [Link]()
if t:
print(f"Transactions for BankID {b}:")
for i in t:
transaction_id, from_bankid, to_bankid, amount, date
= i
16
transaction_type = "Sent" if from_bankid == b else
"Received"
print(f"Transaction ID: {transaction_id}, From:
{from_bankid}, To: {to_bankid}, Amount: {amount}, Date: {date},
Type: {transaction_type}")
[Link]([transaction_id, from_bankid, to_bankid,
amount, transaction_type])
else:
print(f"No transactions found for BankID {b}.")
[Link]()
def transaction_user():
id1 = int(input("Enter your id: "))
id2 = int(input("Enter the id to which money will be
transacted: "))
q = "SELECT bankid FROM user"
[Link](q)
a = [item[0] for item in [Link]()]
if id1 in a and id2 in a and id1 != id2:
amt1 = float(input("Enter the amount to be transacted:
"))
q1 = "SELECT bank_balance FROM user WHERE bankid=%s" %
id1
17
[Link](q1)
a1 = [Link]()[0]
f = a1 - amt1
print("Your current bank balance:", a1)
b = int(input("Enter your pin: "))
q6 = "SELECT pin FROM user WHERE bankid=%s" % id1
[Link](q6)
a4 = [Link]()[0]
if a4 == b:
print("Key match successful")
q4 = "SELECT bank_balance FROM user WHERE
bankid=%s" % id2
[Link](q4)
a2 = [Link]()[0]
f2 = a2 + amt1
q2 = "UPDATE user SET bank_balance=%s WHERE
bankid=%s" % (f, id1)
[Link](q2)
[Link]()
q3 = "UPDATE user SET bank_balance=%s WHERE
bankid=%s" % (f2, id2)
18
[Link](q3)
[Link]()
print("TRANSACTION SUCCESSFUL")
print("Your data:")
q5 = "SELECT bankid, name, age, bank_balance FROM
user WHERE bankid=%s" % id1
[Link](q5)
p = [Link]()
for i in p:
print(i)
print("Data of the receiver:")
q7 = "SELECT bankid, name, age, bank_balance FROM
user WHERE bankid=%s" % id2
[Link](q7)
p1 = [Link]()
for j in p1:
print(j)
transaction_id = generate_transaction_id()
date = input("Enter the date of the transaction
(YYYY-MM-DD): ")
19
q8 = "INSERT INTO transactions (transaction_id,
from_bankid, to_bankid, amount, date) VALUES
(%s, %s, %s, %s, %s)"
[Link](q8, (transaction_id, id1, id2, amt1,
date))
[Link]()
else:
print("Incorrect pin")
else:
print("Invalid bank IDs or same bank ID entered")
# EMPLOYEES SECTION
def sorting():
print("Sort By:")
print("1. ID")
print("2. SALARY")
print("3. NAME")
choice = int(input('Enter your choice: '))
if choice == 1:
s = "SELECT * FROM emp ORDER BY id"
elif choice == 2:
s = "SELECT * FROM emp ORDER BY salary"
elif choice == 3:
s = "SELECT * FROM emp ORDER BY name"
else:
print("Wrong Choice. Please try again.")
20
return
[Link](s)
results = [Link]()
for i in results:
print(i)
def deptmembers():
print("Which department's members do you want to see
details of")
print("1. Manager")
print("2. Sales")
print("3. HR")
print("4. Development")
choice = int(input('Enter your choice: '))
if choice == 1:
s = "SELECT * FROM emp WHERE department = 'Manager'"
elif choice == 2:
s = "SELECT * FROM emp WHERE department = 'Sales'"
elif choice == 3:
s = "SELECT * FROM emp WHERE department = 'HR'"
elif choice == 4:
s = "SELECT * FROM emp WHERE department = 'Development'"
else:
print("Wrong Choice. Please try again.")
return
21
[Link](s)
results = [Link]()
for i in results:
print(i)
def emp_hike():
empid = int(input("Enter the id of employee to update: "))
salary_hike = float(input("Enter the percentage hike: "))
q = "UPDATE emp SET salary = salary + (salary * %s / 100)
WHERE id = %s"
[Link](q, (salary_hike, empid))
[Link]()
print(f"Employee with id {empid} salary hiked by
{salary_hike}%")
def emp_search():
name = input("Enter the name of the employee: ")
q = "SELECT * FROM emp WHERE name LIKE %s"
[Link](q, ('%' + name + '%',))
result = [Link]()
for i in result:
print(i)
def display():
print("Details of all the employees:")
22
q = "SELECT * FROM emp"
[Link](q)
result = [Link]()
for i in result:
print(i)
def enter_emp():
while True:
a = int(input("Enter the ID: "))
b = input("Enter the name: ")
c = input("Enter the department: ")
d = input("Enter the designation: ")
e = float(input("Enter the salary: "))
qu = 'INSERT INTO emp (id, name, department, designation,
salary) VALUES (%s, %s, %s, %s, %s)'
values = (a, b, c, d, e)
[Link](qu, values)
[Link]()
print("Employee added successfully.")
ch = input("Want to enter more records (y/n): ")
if ch in "Nn":
break
def create_employee():
[Link]('''CREATE TABLE IF NOT EXISTS emp
( id INT NOT NULL PRIMARY KEY,
23
name VARCHAR(50) NOT NULL,
department VARCHAR(100) NOT NULL,
designation VARCHAR(100) NOT NULL,
salary DECIMAL(10, 2) NOT NULL)''')
print("Table created")
[Link]("DESCRIBE
emp") result =
[Link]() for i in
result:
print(i)
while True:
print("\n***** MAIN MENU *****")
print("1. Manage Users")
print("2. Manage Employees")
print("3. Exit")
choice = int(input("Enter your choice: "))
if choice == 1:
while True:
print("\n***** USER MENU *****")
print("1. Create User Table")
print("2. Enter User Details")
print("3. Show All Users")
print("4. Show Specific User")
print("5. Show Users by Age Range")
print("6. Delete User Record")
print("7. Update User Details")
24
print("8. View User Transactions")
print("9. User Transaction")
print("10. Back to Main Menu")
user_choice = int(input("Enter your choice: "))
if user_choice == 1:
create_user()
elif user_choice == 2:
entry_user()
elif user_choice == 3:
show_all_user()
elif user_choice == 4:
show_specific_user()
elif user_choice == 5:
age_user()
elif user_choice == 6:
Del_rec_user()
elif user_choice == 7:
update_user()
elif user_choice == 8:
view_transactions()
elif user_choice == 9:
transaction_user()
elif user_choice == 10:
break
else:
print("Wrong Choice. Please try again.")
25
elif choice == 2:
while True:
print("\n***** EMPLOYEE MENU
*****") print("1. Create Employee
Table") print("2. Enter Employee
Details") print("3. Show All
Employees") print("4. Search
Employee by Name") print("5. Sort
Employees") print("6. Department
Members") print("7. Update Employee
Salary") print("8. Back to Main
Menu")
emp_choice = int(input("Enter your choice: "))
if emp_choice == 1:
create_employee()
elif emp_choice == 2:
enter_emp()
elif emp_choice == 3:
display()
elif emp_choice == 4:
emp_search()
elif emp_choice == 5:
sorting()
elif emp_choice == 6:
deptmembers()
elif emp_choice == 7:
emp_hike()
26
elif emp_choice == 8:
break
else:
print("Wrong Choice. Please try again.")
elif choice == 3:
print("Exiting the program.")
break
else:
print("Wrong Choice. Please try again.")
27
SQL Tables in our program
Table User
Table emp
Table trancstions
28
OUTPUT
***** MAIN MENU *****
1. Manage Users
2. Manage Employees
3. Exit
Enter your choice: 1
***** USER MENU *****
1. Create User Table
2. Enter User Details
3. Show All Users
4. Show Specific User
5. Show Users by Age Range
6. Delete User Record
7. Update User Details
8. View User Transactions
9. User Transaction
10. Back to Main Menu
Enter your choice: 1
Table created
('bankid', 'int(11)', 'NO', 'PRI', None, '')
('name', 'varchar(50)', 'NO', '', None, '')
('email', 'varchar(100)', 'NO', 'UNI', None, '')
('age', 'int(11)', 'NO', '', None, '')
('bank_balance', 'decimal(10,2)', 'NO', '', None, '')
('pin', 'int(11)', 'NO', '', None, '')
Enter your choice: 2
Enter 4 digit unique bankid of the new user: 9907
Enter name of person: Rohaan
email address of the user: Rohaan@[Link]
Enter user's age: 30
Enter the money deposited by the user: 5000
Enter your pin XXXX: 1234
29
Account created Want to enter more records y/n: n
Enter your choice: 3
(9901, 'Aakash', 'aakash@[Link]', 30, Decimal('50000.00'), 1234)
(9902, 'Priya', 'priya@[Link]', 28, Decimal('35000.00'), 5678)
(9903, 'Vikram', 'vikram@[Link]', 35, Decimal('60000.00'), 2345)
(9904, 'Neha', 'neha@[Link]', 32, Decimal('45000.00'), 6789)
(9905, 'Rajat', 'rajat@[Link]', 27, Decimal('70000.00'), 1122)
Enter your choice: 4
Enter bankid to search: 9901
(9901, 'Aakash', 'aakash@[Link]', 30, Decimal('50000.00'), 1234)
Enter your choice: 5
Enter lower limit age: 25
Enter upper limit age: 30
(9901, 'Aakash', 'aakash@[Link]', 30, Decimal('50000.00'), 1234)
(9902, 'Priya', 'priya@[Link]', 28, Decimal('35000.00'), 5678)
(9905, 'Rajat', 'rajat@[Link]', 27, Decimal('70000.00'), 1122)
Enter your choice: 6
Enter bankid: 1001
Record with bankid 1001 is deleted
Enter your choice: 7
Enter the bankid of the person to update: 1002
Updating record for bankid: 1002
Enter new name (leave blank to skip): raj
Enter new email (leave blank to skip): raj@[Link]
Enter new age (leave blank to skip): 26
Enter new bank balance (leave blank to skip): 80000
30
Enter new pin (leave blank to skip): 5678
Record with bankid 1002 updated successfully.
Enter your choice: 8
Enter bankid to search transactions: 1002
Transactions for BankID 1002:
Transaction ID: 765432, From: 1002, To: 1003, Amount: 500, Date: 2024-12-18,
Type: Sent
Transaction ID: 123456, From: 1003, To: 1002, Amount: 250, Date: 2024-12-15,
Type: Received
CSV File of transction of bankid 1002 if generated.
Enter your choice: 9
Enter your id: 1001
Enter the id to which money will be transacted: 1002
Enter the amount to be transacted: 1000
Your current bank balance: 5000
Enter your pin: 1234
Key match successful
TRANSACTION SUCCESSFUL
Your data:
(9901, 'Aakash', 'aakash@[Link]', 30, Decimal('50000.00'), 1234)
Enter your choice: 10
31
***** MAIN MENU *****
1. Manage Users
2. Manage Employees
3. Exit
Enter your choice: 2
***** EMPLOYEE MENU *****
1. Create Employee Table
2. Enter Employee Details
3. Show All Employees
4. Search Employee by Name
5. Sort Employees
6. Department Members
7. Update Employee Salary
8. Back to Main Menu
Enter your choice: 1
Table created
('id', 'int(11)', 'NO', 'PRI', None, '')
('name', 'varchar(50)', 'NO', '', None, '')
('department', 'varchar(100)', 'NO', '', None, '')
('designation', 'varchar(100)', 'NO', '', None, '')
('salary', 'decimal(10,2)', 'NO', '', None, '')
Enter your choice: 2
Enter the ID: 2001
Enter the name: Sohan
Enter the department: HR
Enter the designation: Manager
Enter the salary: 50000
Employee added successfully.
32
Want to enter more records (y/n): n
Enter your choice: 3
(1001, 'Mohan', 'Manager', Decimal('60000.00'))
(1002, 'Sita', 'Sales', Decimal('50000.00'))
(1003, 'Ravi', 'HR', Decimal('45000.00'))
(1004, 'Anita', 'Development', Decimal('55000.00'))
Enter your choice: 4
Enter the name of the employee: Ravi
(1003, 'Ravi', 'HR', Decimal('45000.00'))
Enter your choice: 5
Sort By:
1. ID
2. SALARY
3. NAME
Enter your choice:> 2
(1001, 'Mohan', 'Manager', Decimal('60000.00'))
(1004, 'Anita', 'Development', Decimal('55000.00'))
(1002, 'Sita', 'Sales', Decimal('50000.00'))
(1003, 'Ravi', 'HR', Decimal('45000.00'))
33
Enter your choice: 6
Which department's members do you want to see details of
1. Manager
2. Sales
3. HR
4. Development
Enter your choice:> 4
(1004, 'Anita', 'Development', Decimal('55000.00'))
Enter your choice: 7
Enter the id of employee to update: 1003
Enter the percentage hike: 10
Employee with id 1003 salary hiked by 10%
Enter your choice: 8
***** MAIN MENU *****
1. Manage Users
2. Manage Employees
3. Exit
Enter your choice:3
Exiting
34
BIBLIOGRAPHY
• Computer science With Python - Class XIIBy : Sumita Arora
Websites
MySQL Documentation: [Link]
W3Schools: [Link]
GeeksforGeeks: [Link]
35