0% found this document useful (0 votes)
7 views31 pages

Bank Management System-2

The document presents a project on an 'ATM Management System' completed by Jasmeet Singh under the guidance of Mrs. Nutan Parashar for the CBSE curriculum. It includes sections on system design, description, Python coding, and SQL backend, detailing functionalities such as account management, customer information retrieval, and transaction processing. The project is acknowledged by the principal and includes a bibliography of resources used.

Uploaded by

Umang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views31 pages

Bank Management System-2

The document presents a project on an 'ATM Management System' completed by Jasmeet Singh under the guidance of Mrs. Nutan Parashar for the CBSE curriculum. It includes sections on system design, description, Python coding, and SQL backend, detailing functionalities such as account management, customer information retrieval, and transaction processing. The project is acknowledged by the principal and includes a bibliography of resources used.

Uploaded by

Umang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 31

VVDAV PUBLIC SCHOOL

COMPUTER SCIENCE PROJECT


ATM MANAGEMENT
SYSTEM
BY:-JASMEET SINGH ,
XII-C
CERTIFICATE
THIS IS TO CERTIFY THAT JASMEET SINGH
BEARING ROLL NO.______ HAS SUCCESSFULLY
COMPLETED THE PROJECT ON THE TOPIC
“ATM MANAGEMENT SYSTEM” UNDER THE
GUIDANCE OF MRS.NUTAN PARASHAR IN
PARTICULAR FULFILLMENT OF THE
CURRICULUM OF CENTRAL BOARD OF
SECONDARY EDUCATION(CBSE) LEADING TO
THE AWARD OF ANNUAL EXAMINATION OF THE
YEAR 2024 – 2025.

________________
______________
Mrs. Nutan Parashar Mrs. Shalini
Arora
(PGT COMP. SC.) (PRINCIPAL)

ACKNOWLEDGMENT
I HAVE TAKEN EFFORTS IN THIS PROJECT.
HOWEVER, IT WOULD NOT BE POSSIBLE
WITHOUT THE KIND SUPPORT AND HELP OF
MANY INDIVIDUALS. I WOULD LIKE TO THANKS
MY PRINCIPAL, MRS. SHALINI ARORA FOR
PROVIDING ME THE LAB FACILITIES. I WOULD
ALSO LIKE TO THANK MY COMPUTER SCIENCE
TEACHER ,MR. NUTAN PARASHAR, FOR HER
INVALUABLE GUIDANCE WHICH HELPED ME TO
COMPLETE THIS PROJECT.I WOULD ALSO LIKE
TO THANKS MY PARENTS AND MY PROJECT
PARTNERS DEEPAK AND DARSH FOR
HELPING ME TO COMPLETE THIS PROJECT.
INDEX

S.NO TITLE
1) INTRODUCTION

2) SYSTEM DESIGN

3) SYSTEM DESCRIPTION

4) DATA DICTIONARY

5) PYTHON CODING

6) OUTPUT

7) SQL AT BACKEND

8) BIBLIOGRAPHY

9) NOTES
INTRODUCTION
IN THIS PROJECT I HAVE CREATED A “ATM
MANAGEMENT SYSTEM”. IT HELPS THE EMPLOYEE
AND THE CUSTOMER:-
1) TO KNOW ABOUT EVERY DETAILS IN THEIR
SYSTEM.
2)ALSO LET THE CUSTOMER KNOW ABOUT THE
DETAILS OF THEIR ACCOUNT.
3) ABOUT THEIR MONEY LEFT IN THEIR ACCOUNT AND
TO WITHDRAW THE MONEY FROM THEIR ACCOUNT.
4) IT WILL ALSO HELPS THE CUSTOMER AND EMPLOYEE
TO CREATE A NEW ACCOUNT AND TO CREATE A NEW
CUSTOMER.
5) IT WILL ALSO HELPS THE EMPLOYEE TO SEARCH
ABOUT A CUSTOMER DETAILS AND ACCOUNT DETAILS
OF A CUSTOMER.
6) IT WILL ALSO HELPS THE EMPLOYEE TO KNOW
ABOUT ALL THE CUSTOMER AND ACCOUNT DETAILS
WHICH ARE IN THEIR SYSTEM.
7) IT WILL ALSO HELPS THE USER TO DELETE AN
ACCOUNT DETAILS FROM THEIR SYSTEM.
8) IT WILL ALSO HELPS THE USER TO DELETE A
CUSTOMER DETAILS.
SYSTEM DESIGN
LOGIN
SCREEN

MAIN
MENU

CREATE A
CREATE A
NEW
ACCOUNT
USER

DISPLAY DISPLAY
ALL ALL
CUSTOMER ACCOUNT

SEARCH SEARCH AN
CUSTOMER ACCOUNT

DELETE A DELETE AN
CUSTOMER ACCOUNT
SYSTEM DESCRIPTION
IN THIS PROJECT WE HAVE USED PYTHON AS
WELL AS SQL TO CREATE AN “ATM
MANAGEMENT SYSTEM”. TO CONNECT
PYTHON WITH SQL WE HAVE USED
MYSQL.CONNECTOR WHICH HELPS US TO
LINK THE SQL TABLE WITH A PYTHON CODE.
TO CREATE A NEW USER AND CUSTOMER WE
HAVE USED CREATE TABLE AND INSERT
INTO TABLE VALUES() COMMAND. TO
SEARCH AN ACCOUNT AND CUSTOMER WE
HAVE USED SELECT * FROM TABLE WITH A
WHERE COMMAND AND TO DISPLAY ALL
ACCOUNT AND CUSTOMER WE HAVE USED
SELECT * FROM TABLES COMMAND AND TO
DELETE AN ACCOUNT AND CUSTOMER
DETAILS WE HAVE USED DELETE FROM
TABLE WITH A WHERE STATEMENT
COMMAND. WE HAVE ALSO CREATED SOME
FUNCTION TO NOT WRITE THE SAME CODE
AGAIN AND AGAIN. AND WE HAVE ALSO USED
SOME IF-ELSE STATEMENT TO CARRY OUT A
SPECIFIC STATEMENT.
DATA DICTIONARY
1) FUNCTION
i) mysqlConnection() :- to make the
connection between mysql and python.
ii) mysqlConnectionCheck():- to check the
connection between mysql and python.
iii)newCustomer() :- To create a new customer
and insert it information into table.
iv)displayAllCustomer() :- to display all the
customer record in table.
v)searchCustomer() :-To search a record of a
specific customer.
vi)newAccounnt():- To create a new account and
insert the record in the table.
vii)displayAllAccount():- To display all account
record in the table.
vii)searchAccount():- To search a record of a
specific account.
viii)withdrawAmount():- To withdraw money from a
specific account and update amount left in that
account.
ix)deleteCustomer():- To delete record of a specific
customer.
x)deleteAccount():- To delete record of a specific
account.
2) MODULES
i) mysql.connector :- To create a connection
between python and mysql.
3) KEYWORD
i)cid :- Customer ID
ii)userName
iii) password
iv) Cname :- Customer Name
v) Address:- customer address
vi) phone:- customer phone number
vii) account_no :- Customer account number
viii) account_type :- Customer account type
ix) amount :- Money in customer account
x) pin :- Atm pin of customer account
PYTHON CODING FOR
BANK MANAGEMENT SYSTEM
import mysql.connector as con
myConnection = ''
cursor = ''
userName = ''
password = ''
cid = ''

#To check mysql connectivity


def MYSQLconnectionCheck():
global myConnection
global userName
global password

userName = input("\n Enter MYSQL server Username:")


password = input("\n Enter MYSQL server Password:")

myConnection = con.connect(host = "localhost",user =


userName,password=password,auth_plugin =
'mysql_native_password')
if myConnection:
print("\n YOUR MYSQL CONNECTION HAS BEEN
ESTABLISHED")
cursor = myConnection.cursor()
cursor.execute("Create Database if not exists
ATM")
cursor.execute("Commit")
cursor.close()
return myConnection
else:
print("\n ERROR ESTABLISHING MYSQLL
CONNECTION CHECK USERNAME AND PASSWORD")

#To establish MYSQL connection


def MYSQLconnection():
global userName
global password
global myConnection

myConnection = con.connect(host =
"localhost",user=userName,password =
password,database = "ATM",auth_plugin =
'mysql_native_password')
if myConnection:
return myConnection
else:
print("\n ERROR ESTABLISHING MYSQL
CONNECTION!")
myConnection.close()

#To create New Customer


def newCustomer():
global cid
if myConnection:
cursor = myConnection.cursor()
createTable = "Create Table if not exists
customer(CID VARCHAR(10) PRIMARY KEY,CNAME
VARCHAR(30) NOT NULL, ADDRESS VARCHAR(30) NOT
NULL, PHONE VARCHAR(12) NOT NULL)"
cursor.execute(createTable)
print("\nPlease Fill All Information Carefully!")
cid = input("\n PLEASE ENTER CUSTOMER ID:")
cname = input("PLEASE ENTER CUSTOMER NAME:")
address = input("PLEASE ENTER CUSTOMER
ADDRESS:")
phone = input("PLEASE ENTER CUSTOMER CONTACT
NO:")
sql = "insert into customer values(%s,%s,%s,%s)"
values =(cid,cname,address,phone)
cursor.execute(sql,values)
cursor.execute("Commit")
cursor.close()
print("\n New customer added successfully!")

# To display customer information


def displayAllCustomer():
if myConnection:
cursor = myConnection.cursor()
cursor.execute("Select * from customer")
data = cursor.fetchall()
if data:
print("\n =======DETAILS OF ALL
CUSTOMER=======")
print(data)
else:
print("SORRY! NO RECORD FOUND")
else:
print("\n ERROR ESTABLISHING MYSQL
CONNECTION!")

# To search A customer
def searchCustomer():
global cid
if myConnection:
cursor = myConnection.cursor()
cid = input("PLEASE ENTER CUSTOMER ID:")
sql = "Select * from customer where CID = %s"
value = (cid,)
data = cursor.execute(sql,value)
data = cursor.fetchall()
if data:
print("\n =======CUSTOMER
DETAILS=======")
print(data)
else:
print("SORRY! CUSTOMER NOT FOUND")
else:
print("\n SOMETHING WENT WRONG")

# To open a new account


def newAccount():
global cid
if myConnection:
cursor = myConnection.cursor()
cid = input("PLEASE ENTER CUSTOMER ID:")
sql = "Select * from customer where CID =%s"
value = ( cid,)
data = cursor.execute(sql,value)
data = cursor.fetchall()
if data:
createTable = " Create table if not exists
account(CID VARCHAR(10),ACCOUNT_NO INT PRIMARY
KEY,ACCOUNT_TYPE VARCHAR(20) NOT NULL, AMOUNT
INT NOT NULL,PIN INT NOT NULL)"
cursor.execute(createTable)
account_no = int(input("PLEASE ENTER ACCOUNT
NUMBER(0-9):"))
account_type = input("PLEASE ENTER ACCOUNT
TYPE(S-SAVING/C-CURRENT):")
amount = int(input("ENTER THE AMOUNT TO
DEPOSIT:"))
ATM_pin = int(input("PLEASE ENTER THE ATM
PIN(FOUR DIGITS ONLY):"))
sql = "insert into account values(%s,%s,%s,%s,
%s)"
values =
(cid,account_no,account_type,amount,ATM_pin)
cursor.execute(sql,values)
cursor.execute("Commit")
print("\n NEW ACCOUNT CREATED
SUCCESSFULLY")
else:
print("SORRY! ACCOUNT NOT OPENED")
else:
print("\n SOMETHING WENT WRONG")

# To display all accounts


def displayAllAccounts():
if myConnection:
cursor = myConnection.cursor()
cursor.execute("Select * from account")
data = cursor.fetchall()
if data:
print("\n =======DETAILS OF ALL
CUSTOMER=======")
print(data)
else:
print("SORRY! NO ACCOUNT INFORMATION")
else:
print("\n SOMETHING WENT WRONG")

# To search an account
def searchAccount():
global cid
if myConnection:
cursor = myConnection.cursor()
cid = input("PLEASE ENTER CUSTOMER ID:")
account_no = int(input("PLEAASE ENTER ACCOUNT
NUMBER(0-9):"))
sql = "select * from account where CID = %s and
ACCOUNT_NO = %s"
value = (cid,account_no)
data = cursor.execute(sql,value)
data = cursor.fetchall()
if data:
print("\n =======CUSTOMER ACCOUNT
DETAILS=======")
print(data)
else:
print("SORRY! NO ACCOUNT INFORMATION
FOUND")
else:
print("\n SOMETHING WENT WRONG")

# To withdraw amount
def withdrawAmount():
count = 3
if myConnection:
cursor = myConnection.cursor()
account_no = int(input("PLEASE ENTER ACCOUNT
NUMBER(0-9):"))
sql = "select * from account where ACCOUNT_NO =
%s"
values= (account_no,)
data = cursor.execute(sql,values)
data = cursor.fetchall()
if data:
while True:
ATM_PIN = int(input("ENTER THE ATM
PIN(ONLY 3 ATTEMPTS ALLOWED):"))
sql = "select * from account where PIN = %s"
value = (ATM_PIN,)
cursor.execute(sql,value)
data = cursor.fetchall()
if data:
amount = int(input("PLEASE ENTER AMOUNT
TO WITHDRAW:"))
sql = "update ACCOUNT set AMOUNT =
AMOUNT - %s"
value = (amount,)
cursor.execute(sql,value)
cursor.execute("Commit")
print("=======TRANSACTION
SUCCESSFULLY COMPLETED=======")
break
else:
print("WRONG PIN! PLEASE ENTER VALID
PIN")
count = count - 1
print("YOU ARE LEFT WITH ONLY",
count ,"ATTEMPTS")
if count == 0:
print("YOUR CARD HAS BEEN BLOCKED")
break
else:
print("SORRY! ACCOUNT NOT FOUND")
# To delete an account
def deleteAccount():
global cid
if myConnection:
cursor = myConnection.cursor()
cid = input("PLEASE ENTER CUSTOMER ID:")
sql = "Select * from customer where CID =%s"
value = ( cid,)
data = cursor.execute(sql,value)
data = cursor.fetchall()
if data:
cursor = myConnection.cursor()
account_no = int(input("ENTER THE ACCOUNT
NUMBER:"))
sql = "delete from account where ACCOUNT_NO =
%s"
value = (account_no,)
cursor.execute(sql,value)
cursor.execute("Commit")
print("\n ACCOUNT DELETED SUCCESSFULLY!")
else:
print("SORRY! NO ACCOUNT FOUND")
else:
print("\n SOMETHING WENT WRONG!")

# To delete a customer details


def deleteCustomer():
global cid
if myConnection:
cursor = myConnection.cursor()
cid = input("PLEASE ENTER CUSTOMER ID:")
sql = "Select * from customer where CID =%s"
value = ( cid,)
data = cursor.execute(sql,value)
data = cursor.fetchall()
if data:
cursor = myConnection.cursor()
sql = "delete from customer where CID = %s"
value = (cid,)
cursor.execute(sql,value)
cursor.execute("Commit")
print("\n CUSTOMER DELETED SUCCESSFULLY!")
else:
print("SORRY! NO ACCOUNT FOUND")
else:
print("\n SOMETHING WENT WRONG!")

# Main Screen
myConnection = MYSQLconnectionCheck()
if myConnection:
MYSQLconnection()
while True:
print("\n
=======================================
=")
print("1. NEW USER")
print("2. DISPLAY ALL CUSTOMER")
print("3. SEARCH A CUSTOMER")
print("4. OPEN A NEW ACCOUNT")
print("5. DISPLAY ALL ACCOUNT")
print("6. SEARCH AN ACCOUNT")
print("7. WITHDRAW AMOUNT")
print("8. DELETE AN ACCOUNT")
print("9. DELETE A CUSTOMER")
print("10. EXIT")
print("\n
=======================================
=")
choice = int(input("ENTER YOUR CHOICE(1-10):"))
if choice == 1:
newCustomer()
elif choice == 2:
displayAllCustomer()
elif choice == 3:
searchCustomer()
elif choice == 4:
newAccount()
elif choice == 5:
displayAllAccounts()
elif choice == 6:
searchAccount()
elif choice == 7:
withdrawAmount()
elif choice == 8:
deleteAccount()
elif choice == 9:
deleteCustomer()
elif choice == 10:
break
else:
print("SORRY! MAY BE YOU ARE GIVING WRONG
INPUT")
else:
print("CHECK YOUR MYSQL CONNECTION FIRST!!!")

SCREENSHOTS OF THE OUTPUT


1)New user
2) Display all customer
3) Search a customer

4) Open a new account


5) Display all account

6) Search an account
7) Withdrawing money

Amount left after withdrawing


8) Delete an account

Checking accounts after deletion


9) Delete a customer

Checking customer after deletion


10) Exit

SQL AT BACKEND
Database Tables in ATM
Structure of customer table

Structure of account table


Open new customer

Open a new account

After withdrawing

After deletion of customer

After deletion of account

BIBLIOGRAPHY
1. https://pythonclassroomdiary.in
2. https://xiipython.blogspot.com
3. https://www.mysql.com/
4. https://www.geeksforgeeks.org
5. https://pythonworld.in

You might also like