You are on page 1of 29

CHINMAYA VIDYALAYA CBSE SENIOR

SECONDARY SCHOOL

AISSCE 2021-2022
INFROMATICS PRACTICES
PROJECT

SUBMITTED BY

NIKHIL.R XII- B
EXAM NO:

17 |
Page
BANK MANAGEMENT SYSTEM
(USING PYHTON AND MYSQL)

SYNOPSIS

The ‘Bank Management System’ is an application that is


designed for the banking sector used to access all the banking facilities
17 |
Page
like creating an account, depositing money, withdrawing money etc.
This system helps the management to keep records safe and proper
without any difficulty and it’s easy to use anyone with the username and
with the password can access the system.

The main aim behind the project is to make the process of bank
management system easy and faster which is not manually possible,
which can be made possible by this project.

The project was done using Python 3.8(64-bit) as front-end for


executing the source code on the python platform itself. MySQL 8.0 has
been used as the back-end software where all data has been stored in a
database, in the form of relations. The module mysql.connector allows
user to connect Python and MySQL and execute MySQL queries directly
from Python.

INTRODUCTION TO THE PROJECT

 Bank Management System is a project where all the banking


operations are performed easily and efficiently by computer. Unlike
17 |
Page
online banking system this bank management system application
covers all the transactions like new account opening, deposit and
withdrawal of amount and money for various processes

 First you will get to see a login screen where you have to enter the
correct username and password to access all the mentioned features:

I. Create account

II. Deposit money

III. Withdraw money

IV. Update details of the account holder

i. Name

ii. Phone number

iii. City

V. Balance enquiry

VI. Viewing the details of the account holder

VII. closing the account.

 If you have entered the password wrongly then you cannot access the
features.

 All the data will be stored in the mysql database which safe and easy to do.

17 |
Page
SYSTEM CONFIGURATION

SYSTEM CONFIGURATION

17 |
Page
SOFTWARE USED:

 Python 3.8(64-bit)-Front end


 Operating system – Microsoft® Windows 10 (64-bit operating system, x64-
based processor)
 MySQL 8.0 – Back end

HARDWARE USED:
 4 GB RAM (2 GB+ recommended)
 Hard disk capacity: 1 TB
 Basic CPU
 Output device – 1024x768 Monitor (resolution)
 Input device – Mouse, Keyboard

ABOUT PYTHON

Python was developed by Guido Van Rossum in 1991. Python is based on


or influenced by two programming languages:

 ABC language
17 |
Page
 Modula-3

It is a high-level language that was created for general purpose


programming.

Its Advantages are:

 Cross-Platform Language: Python runs equally well on a variety of


platforms like Windows, Linux/UNIX, Macintosh etc.
 Interpreted language: Makes it easy-to-debug language as it executes the
code line by line, making it suitable for beginners also.
 Expressive language: Being HLL(High Level Language) it is
capable to expressing the code more simpler than others.
 Free and Open Source: Python language is freely available i.e without any
cost. It’s source code is also available online. It can be extended, modified
and improved according to the will of the user

Its Disadvantages are:


Speed: Python is slower than C or C++. But of course, Python is a high-level language,
unlike C or C++ it's not closer to hardware.
Memory Consumption : Python is not a good choice for memory intensive tasks. Due to
the flexibility of the data-types, Python's memory consumption is also high.
Database Access : Python has limitations with database access . As compared to the
popular technologies like JDBC and ODBC, the Python's database access layer is found to
be bit underdeveloped and primitive . However, it cannot be applied in the enterprises that
need smooth interaction of complex legacy data 
Runtime Errors : Python programmers cited several issues with the design of the
language. Because the language is dynamically typed , it requires more testing and has
errors that only show up at runtime

17 |
Page
STATEMENTS USED IN MY PROJECT

IF STATEMENT: Python supports the usual logical conditions from mathematics:

 Equals: a == b
 Not Equals: a != b
 Less than: a < b
 Less than or equal to: a <= b
 Greater than: a > b
 Greater than or equal to: a >= b

These conditions can be used in several ways, most commonly in "if statements" and loops.

An "if statement" is written by using the if keyword.

ELIF STATEMENT: The elif keyword is pythons way of saying "if the previous


conditions were not true, then try this condition".

ELSE STATEMENT: The else keyword catches anything which isn't caught by the


preceding conditions. You can also have an else without the elif.

17 | P a g e
MY SQL

MySQL is an Oracle-backed open source relational database management system (RDBMS)


based on Structured Query Language(SQL). MySQL runs on virtual
All platforms ,including Linux, UNIX and Windows. Although it can be used in a wide
range of applications, MySQL is most often associated with web applications and online
publishing

Features of MySQL:

 MySQL is a Relational Database Management System or RDBMS which means that it


stores and presents data in tabular form, organized in rows and columns.
 MySQL is more secure as it consists of a solid data security layer to protect sensitive
data from intruders and passwords in MySQL are encrypted.
 MySQL is available for free to download and use from the official site of MySQL.
 MySQL is compatible with most of the operating systems, including Windows, Linux,
NetWare, Novell, Solaris and other variations of UNIX.

.Disadvantages of MySQL:

 MySQL is not very efficient in handling very large databases.


 MySQL doesn’t have as good a developing and debugging tool as compared to paid
databases.
 MySQL versions less than 5.0 do not support COMMIT, stored procedure and ROLE.
 MySQL is prone to data corruption as it inefficient in handling transactions.
 MySQL does not support SQL check constraints.

17 | P a g e
CODINGS

import mysql.connector
con=mysql.connector.connect(host="localhost",user="root",passwd="NIKHIL",database='ba
nk')
cursor=con.cursor()

username = "admin"
password=1010

l=print ("""1.𝐋𝐎𝐆𝐈𝐍
2.𝐄𝐗𝐈𝐓""")
print("----------------------------------------------------")
e=int(input("𝐄𝐍𝐓𝐄𝐑 𝐓𝐇𝐄 𝐂𝐇𝐎𝐈𝐂𝐄:"))
print("----------------------------------------------------")
if (e==1):
inp= input("𝐄𝐍𝐓𝐄𝐑 𝐓𝐇𝐄 𝐔𝐒𝐄𝐑𝐍𝐀𝐌𝐄:")
if (inp==username):
p=int(input("𝐄𝐍𝐓𝐄𝐑 𝐓𝐇𝐄 𝐏𝐀𝐒𝐒𝐖𝐎𝐑𝐃:"))
else:
print("𝐖𝐑𝐎𝐍𝐆 𝐔𝐒𝐄𝐑𝐍𝐀𝐌𝐄!!")
print("-------------------------------------------------------")
if (p==password):
print("----------------------------------------------------")
print("𝐋𝐎𝐆𝐈𝐍𝐄𝐃 𝐒𝐔𝐂𝐂𝐄𝐒𝐒𝐅𝐔𝐋𝐋𝐘!!!")
print("-----------------------------------------------------")
print("************************𝐖𝐄𝐋𝐂𝐎𝐌𝐄**********************")
print("-----------------------------------------------------")
print("MAIN MENU:")
17 | P a g e
print("")
print("1.𝐂𝐑𝐄𝐀𝐓𝐄 𝐀𝐂𝐂𝐎𝐔𝐍𝐓")
print("2.𝐃𝐄𝐏𝐎𝐒𝐈𝐓 𝐌𝐎𝐍𝐄𝐘")
print("3.𝐖𝐈𝐓𝐇𝐃𝐑𝐀𝐖 𝐌𝐎𝐍𝐄𝐘")
print("4.𝐕𝐈𝐄𝐖 𝐃𝐄𝐓𝐀𝐈𝐋𝐒")
print("5.𝐔𝐏𝐃𝐀𝐓𝐄 𝐃𝐄𝐓𝐀𝐈𝐋𝐒")
print("6.𝐁𝐀𝐋𝐀𝐍𝐂𝐄 𝐄𝐍𝐐𝐔𝐈𝐑𝐘")
print("7.𝐂𝐋𝐎𝐒𝐄 𝐀𝐂𝐂𝐎𝐔𝐍𝐓")
print("--------------------------------------------------------")
a= int(input("ENTER YOUR CHOICE:"))
print("-----------------------------------------------------")
if (a==1):
bank=int(input("ENTER THE ACCOUNT NUMBER:"))
name=input("ENTER YOUR NAME:")
city=input("NAME OF YOUR CITY:")
ac=int(input("ENTER YOUR AADHAAR NUMBER:"))
ph=int(input("ENTER YOUR PHONE NUMBER:"))
balance=0
at=input("ENTER THE TYPE OF ACCOUNT YOU PREFER(SAVINGS[S]\
CURRENT[C]):")
query="insert into bank values({},'{}','{}','{}','{}',
{},'{}')".format(bank,name,city,ac,ph,balance,at)
cursor.execute(query)
con.commit()
print("---------------------------------------------------------------")
print("ACCOUNT CREATED SUCCESSFULLY!!!!")
print("********************THANK YOU***************************")
if (a==2):
bank=int(input("ENTER YOUR ACCOUNT NUMBER:"))
amt=int(input("ENTER THE AMOUNT TO BE DEPOSITED:"))
17 | P a g e
query="update bank set balance= balance + {} where
ACC_NO={}".format(amt,bank)
cursor.execute(query)
con.commit()
print("MONEY DEPOSITED SUCCESSFULLY!!!!!")
print("--------------------------------------------------------")
print("********************THANK YOU***************************")
if (a==3):
bank=int(input("ENTER YOUR ACCOUNT NUMBER:"))
amt=int(input("ENTER THE AMOUNT TO BE WITHDRAWN:"))
query="update bank set balance= balance -{} where
ACC_NO={}".format(amt,bank)
cursor.execute(query)
con.commit()
print("MONEY WITHDRAWN SUCCESSFULLY!!!!!")
print("--------------------------------------------------------")
print("********************THANK
YOU***************************")
if (a==4):
bank=int(input("ENTER YOUR ACCOUNT NUMBER:"))
query="select * from bank where ACC_NO={}".format(bank)
cursor.execute(query)
details=cursor.fetchone()
print("-----------------------------------------")
print("THE DETAILS OF YOUR ACCOUNNT ARE
GIVEN BELOW:")
print("")
print("ACC.NO:",bank)
print("NAME:",details[1])
print("CITY:",details[2])
17 | P a g e
print("PHONE.NO:",details[4])
print("ACCOUNT_TYPE:",details[-1])
print("BALNCE AMOUNT:",details[-2])
print("")
print("------------------------------------------")
print("********************THANK YOU***************************")

if (a==5):
print("""CHOOSE THE DETAIL THAT YOU WANT TO UPDATE:
1.NAME
2.CITY
3.PHONE NUMBER""")
b=int(input("ENTER YOUR CHOCIE:"))
print('---------------------------------------------')

if (b==1):
bank=int(input("ENTER YOUR ACCOUNT NUMBER:"))
n=input("ENTER YOUR NEW NAME:")
query="update bank set NAME='{}' where ACC_NO={}".format(n,bank)
cursor.execute(query)
con.commit()
print("NAME UPDATED SUCCESSFULLY!!!!!!!!")
print("********************THANK
YOU***************************")

if(b==2):
bank=int(input("ENTER YOUR ACCOUNT NUMBER:"))
n=input("ENTER YOUR NEW CITY:")
query="update bank set city ='{}' where ACC_NO={}".format(n,bank)

17 | P a g e
cursor.execute(query)
con.commit()
print("city UPDATED SUCCESSFULLY!!!!!!!!")
print("********************THANK
YOU***************************")

if(b==3):
bank=int(input("ENTER YOUR ACCOUNT NUMBER:"))
n=int(input("ENTER YOUR NEW moblie number:"))
query="update bank set PHONE_NO ='{}' where ACC_NO={}".format(n,bank)
cursor.execute(query)
con.commit()
print("mobile number UPDATED SUCCESSFULLY!!!!!!!!")
print("********************THANK
YOU***************************")
if (a==6):
bank=int(input("ENTER YOUR ACCOUNT NUMBER:"))
query="select * from bank where ACC_NO={}".format(bank)
cursor.execute(query)
details=cursor.fetchone()
print("BALNCE AMOUNT:",details[-2])
print("")
print("------------------------------------------")
print("********************THANK YOU***************************")
if(a==7):
bank=int(input("ENTER THE ACCOUNT NUMBER:"))
query="delete from bank where ACC_NO={}".format(bank)
cursor.execute(query)
con.commit()

17 | P a g e
print("DELETED SUCCESSFULLY!!!!")
print("--------------------------------------------------------")
print("********************THANK YOU***************************")

else:
print("𝐖𝐎𝐑𝐍𝐆 𝐏𝐀𝐒𝐒𝐖𝐎𝐑𝐃!!!!!!!")

if (e==2):
print("𝐓𝐇𝐀𝐍𝐊 𝐘𝐎𝐔 !!!!!1")

Tables created in MySQL 8.0 :


17 | P a g e
During the execution of the application there ONLY 1 table created
namely “bank”. The descriptions of the tables are given below

TABLE BANK: The table stores all details of the bank customer .these
details are entered and you login successfully.

PRIMARY KEY : account number .

17 | P a g e
OUTPUT

17 | P a g e
LOGIN: Before being able to access the banking system you need to login using a
specified username and password.

 After you enter the correct username and password you will see this
screen which shows the main menu:

  If the password is entered wrong the program will get


terminated like:

EXIT: if you choose the exit option while logging in you will get
terminated.

17 | P a g e
MAIN MENU: This is the main part where all the functions takes place
like creating , deleting , updating etc…

1. CREATING AN ACCOUNT: Here a new account is created with


the details of the customer..

This is how it is saved in sql databse :

17 | P a g e
2.Deposit money: It is the option where you can add money to your
account.

3.WITHDRAW MONEY: This option will help you in withdrawing


money .

17 | P a g e
4.VIEW DETAILS : This will show the details (name ,phone number, city, bank
balance) of the respective account holder.

5.UPDATE DETAILS: Through this we can change the details of the


account holder.

The name has also changed in the database:

17 | P a g e
6.BALANCE ENQUIRY: this will show the balance amount in your
bank account.

7.CLOSE ACCOUNT: through this the account get deleted or removed


from the database.

17 | P a g e
17 | P a g e
FUTURE ENHANCEMENT

17 | P a g e
FUTURE ENHANCEMENTS

 The project has a very vast scope in future. The project can be
implemented on intranet in future.

 Project can be updated in near future as and when requirement for the same
arises, as it is very flexible in terms of expansion.

 With the proposed software of database bankers are now able to manage and
hence run the entire work in a much better, accurate and error free manner.

 It is easy to use and No paper work required while opening a bank account

 It saves our time and there is no lag in between.

 Using this project Less manpower is required and faster performance.

 Proper database is generated which saves the data.

17 | P a g e
CONCLUSION

17 | P a g e
CONCLUSION

 This project was successfully completed using python IDLE.

 This will make the work easier when is it implemented properly .

 It meets the requirements of the user makes it easy for them which saves time for
them .where it can be used for creating an account with valid details . it can be used to
deposit, withdraw, check balance and modify the details .

 This bank management has the accuracy than the manual bank which indirectly save the
time.

17 | P a g e
BIBLIOGRAPHY

17 | P a g e
BIBILIOGRAPHY
 www.google.com

 Class 11 sumit arora IP book

 Class 12 sumit arora IP book

 www.w3schools.com

 https://stackoverflow.com/

17 | P a g e

You might also like