Cs Project Og
Cs Project Og
COIMBATORE
Mrs. R. Nandhini,
2024-2025.
been possible without the kind support and help of many individuals.
Principal Mrs. Jayalatha Rosalin and the school for providing me with
for her invaluable guidance which has sustained my efforts in all the
I would also like to thank my parents for their continuous support and
the computer lab assistants in developing the project and to the people
1. Introduction
MANAGEMENT SYSTEM.
application program is tied with the database for easy access and interface
This software, being simple in design and working, does not require much
5
BANK MANAGEMENT SYSTEM
powerful front-end tool is used for getting Graphical User Interface (GUI)
6
BANK MANAGEMENT SYSTEM
The proposed system should maintain all the records and transactions,
and should generate the required reports and information when
required.
In its current scope, the software enables user to retrieve and update the
information from centralized database designed with MySQL . This
7
BANK MANAGEMENT SYSTEM
software does not require much training time of the users due to limited
functionality and simplicity.
Despite of the best effort of the developer, the following limitations and
functional boundaries are visible, which limits the scope of this application
software.
8
BANK MANAGEMENT SYSTEM
3. System Implementation
4. Theoretical Background
Installing Python:
It can be installed by using website :
https://www.python.org/downloads/
• Using IDLE
10
BANK MANAGEMENT SYSTEM
step 1. iii. Now process as required As per the situation, you need to write
instructions to process the file as desired. For example, you might need to open
the file and then read it one line at a time while making some computation, and
so on. iv. Close the file This is very important step especially if you have opened
the file in write mode. This is because, sometimes the last lap of data remains in
buffer and is not pushed on to disk until a close() operation is performed.
table for each topic means you can store that data only once, which makes
your database more efficient and reduces data-entry errors. Table organises
data into columns (called fields) and rows (called records).
A Primary key is one or more fields whose value or values uniquely identify
each record in a table. In a relationship, a primary key is used to refer to
specific record in one table from another table. A primary key is called
foreign key when it is referred to from another table.
To find and retrieve just the data that meets conditions you specify,
including data from multiple tables, create a query. A query can also update
or delete multiple records at the same time, and perform built-in or custom
calculations on your data.
12
BANK MANAGEMENT SYSTEM
13
BANK MANAGEMENT SYSTEM
MySQL, the most popular Open Source SQL database management system,
is developed, distributed, and supported by Oracle Corporation. MySQL is
named after co-founder Monty Widenius's daughter, My. The name of the
MySQL Dolphin (our logo) is “Sakila,”.
15
BANK MANAGEMENT SYSTEM
16
BANK MANAGEMENT SYSTEM
• APIs for C, C++, Eiffel, Java, Perl, PHP, Python, Ruby, and Tcl are
available, enabling MySQL clients to be written in many languages.
• The Connector/ODBC (MyODBC) interface provides MySQL support
for client programs that use ODBC (Open Database Connectivity)
connections.
• The Connector/J interface provides MySQL support for Java client
programs that use JDBC connections. Clients can be run on Windows
or Unix. Connector/J source is available.
This software project maintains a database named class12 which contains the
following tables:
Table Design:
The database of BANK MANAGEMENT SYSTEM contains 4 tables in
database Library. The tables are normalized to minimize the redundancies
17
BANK MANAGEMENT SYSTEM
of data and enforcing the validation rules of the organization. Most of the
tables are designed to store master records. The tables and their structure are
given below:
DBMS: MySQL
Host: localhost , User: root , Pass: h , DataBase: class12
18
BANK MANAGEMENT SYSTEM
"""***********************************************************************
******
MODULES USED IN PROJECT
**************************************************************************
***"""
import pickle
import os
"""***********************************************************************
******
CLASS USED IN PROJECT
**************************************************************************
***""" class
account(object):
def __init__(s):
s.acno=0
s.name=""
s.deposit=0
19
BANK MANAGEMENT SYSTEM
s.type=""
def create_account(s): #function to get data from user
name=raw_input("\n\nEnter the name of the account holder: ")
s.name=name.capitalize()
type=raw_input("\nEnter type of the account (C/S): ")
s.type=type.upper()
s.deposit=input("\nEnter initial amount\n(>=500 for Saving and
>=1000 for Current): ")
"""***********************************************************************
******
FUNCTION TO GENERATE ACCOUNT NUMBER
**************************************************************************
20
BANK MANAGEMENT SYSTEM
***""" def
gen_acno():
try:
inFile=open("account2.dat","rb")
outFile=open("text2.dat","wb")
n=inFile.read() n=int(n)
while True: n+=1
outFile.write(str(n))
inFile.close() outFile.close()
os.remove("account2.dat")
os.rename("text2.dat","account2.dat")
yield n except IOError:
print ("I/O error occured")
"""***********************************************************************
******
FUNCTION TO WRITE RECORD IN BINARY FILE
**************************************************************************
***""" def
write_account():
try:
ac=account()
outFile=open("account.dat","ab")
ch=gen_acno() ac.acno=ch.next()
ac.create_account()
pickle.dump(ac,outFile)
outFile.close()
print ("\n\n Account Created Successfully")
print ("\n\n YOUR ACCOUNT NUMBER IS: ",ac.retacno())
except: pass
"""***********************************************************************
******
FUNCTION TO DISPLAY ACCOUNT DETAILS GIVEN BY USER
**************************************************************************
***""" def
display_sp(n):
flag=0
try:
inFile=open("account.dat","rb")
print ("\nBALANCE DETAILS\n")
while True:
ac=pickle.load(inFile)
if ac.retacno()==n:
ac.show_account()
flag=1
except EOFError:
inFile.close if flag==0:
print ("\n\nAccount number not exist")
21
BANK MANAGEMENT SYSTEM
except
IOError:
print ("File could not be open !! Press any Key...")
"""***********************************************************************
******
FUNCTION TO MODIFY RECORD OF FILE
**************************************************************************
***""" def
modify_account(n):
found=0
try:
inFile=open("account.dat","rb")
outFile=open("temp.dat","wb")
while True:
ac=pickle.load(inFile) if
ac.retacno()==n: print
(30*"-")
ac.show_account()
print (30*"-")
print ("\n\nEnter The New Details of Account")
ac.modify() pickle.dump(ac,outFile) print
("\n\n\tRecord Updated") found=1 else:
pickle.dump(ac,outFile)
except EOFError:
inFile.close()
outFile.close()
if found==0:
print( "\n\nRecord Not Found ")
except
IOError:
print ("File could not be open !! Press any Key...")
os.remove("account.dat")
os.rename("temp.dat","account.dat")
"""***********************************************************************
******
FUNCTION TO DELETE RECORD OF FILE
**************************************************************************
***""" def
delete_account(n):
found=0
try:
inFile=open("account.dat","rb")
outFile=open("temp.dat","wb") while
True:
22
BANK MANAGEMENT SYSTEM
ac=pickle.load(inFile)
if ac.retacno()==n:
found=1
print ("\n\n\tRecord Deleted ..")
else:
pickle.dump(ac,outFile)
except EOFError:
inFile.close()
outFile.close()
if found==0:
print ("\n\nRecord Not Found")
except
IOError:
print ("File could not be open !! Press any Key...")
os.remove("account.dat")
os.rename("temp.dat","account.dat")
"""***********************************************************************
******
FUNCTION TO DISPLAY ALL ACCOUNT DETAILS
**************************************************************************
***""" def display_all(): print
("\n\n\tACCOUNT HOLDER LIST\n\n") print
(60*"=")
print ("%-10s"%"A/C No.","%-20s"%"Name","%-10s"%"Type","%-
6s"%"Balance")
print (60*"=","\n")
try:
inFile=open("account.dat","rb")
while True:
ac=pickle.load(inFile)
ac.report()
except EOFError:
inFile.close()
except
IOError:
print ("File could not be open !! Press any Key...")
"""***********************************************************************
******
FUNCTION TO DEPOSIT/WITHDRAW AMOUNT FOR GIVEN ACCOUNT
**************************************************************************
***""" def
deposit_withdraw(n,option):
found=0
try:
inFile=open("account.dat","rb")
outFile=open("temp.dat","wb")
23
BANK MANAGEMENT SYSTEM
while True:
ac=pickle.load(inFile) if
ac.retacno()==n:
ac.show_account() if
option==1:
print ("\n\n\tTO DEPOSIT AMOUNT")
amt=input("Enter the amount to be deposited: ")
ac.dep(amt) elif option==2:
print ("\n\n\tTO WITHDRAW AMOUNT")
amt=input("Enter amount to be withdraw: ")
bal=ac.retdeposit()-amt
if((bal<500 and ac.rettype()=="S")or(bal<1000 and
ac.rettype()=="C")):
print ("Insufficient balance")
else:
ac.draw(amt)
pickle.dump(ac,outFile) found=1
print ("\n\n\tRecord Updated")
else: pickle.dump(ac,outFile)
except EOFError:
inFile.close()
outFile.close()
if found==0:
print ("\n\nRecord Not Found")
except
IOError:
print ("File could not be open !! Press any Key...")
os.remove("account.dat")
os.rename("temp.dat","account.dat")
"""***********************************************************************
******
INTRODUCTORY FUNCTION
**************************************************************************
***""" def
intro():
print ("\n\n\tBANK")
print ("\n\tMANAGEMENT")
print ("\n\n\nMADE BY : Enter your name")
print ("\nSCHOOL : Enter your school name")
"""***********************************************************************
******
THE MAIN FUNCTION OF PROGRAM
**************************************************************************
24
BANK MANAGEMENT SYSTEM
***"""
intro()
while
True:
print (3*"\n",60*"=")
print ("""MAIN MENU
1. New Account
2. Deposit Amount
3. Withdraw Amount
4. Balance Enquiry
5. All Account Holder List
6. Close An Account
7. Modify An Account
8. Exit
""") try: ch=input("Enter
Your Choice(1~8): ") if ch==1:
write_account()
elif ch==2:
num=input("\n\nEnter Account Number: ")
deposit_withdraw(num,1)
elif
ch==3:
num=input("\n\nEnter Account Number: ")
deposit_withdraw(num,2)
elif
ch==4:
num=input("\n\nEnter Account Number: ")
display_sp(num)
elif
ch==5:
display_all()
elif
ch==6:
num=input("\n\nEnter Account Number: ")
delete_account(num)
elif ch==7:
num=input("\n\nEnter Account Number: ")
modify_account(num)
elif
ch==8:
break
else:
print ("Input correcr choice...(1-8)")
except NameError: print ("Input
correct choice...(1-8)")
"""***********************************************************************
******
END OF PROJECT
**************************************************************************
***"""
26
BANK MANAGEMENT SYSTEM
27
BANK MANAGEMENT SYSTEM
28
BANK MANAGEMENT SYSTEM
29
BANK MANAGEMENT SYSTEM
7. User Manual
Hardware Requirement-
Intel Pentium/Celeron or similar processor based PC at Client/Server end.
30
BANK MANAGEMENT SYSTEM
Software Requirement-
Windows 2000/XP OS is desirable.
NetBeans Ver 5.1 or higher should be installed with JDK and JVM.
Database Installation-
The software project is distributed with a backup copy of a Database named class12 with
required tables. Some dummy records are present in the tables for testing purposes,
which can be deleted before inserting real data. The project is shipped with manav.SQL
file which installs a database and tables in the computer system.
Note: The PC must have MySQL server with user (root) and password (h) . If root
password is any other password, it can be changed by running MySQL Server Instance
Configure Wizard.
Start Program MySQL MySQL Server MySQL Server Instance Config Wizard
Provide current password of root and new password as “h” , this will change the root password.
To install a MySQL database from a dump file (ais.sql) , simply follow the following steps.
Step 1: Copy the manav.sql file in C:\Program files\Mysql\MySql server 5.1\Bin folder.
Step 2: Open MySQL and type the following command to create the database named
class12.
mysql> create database class12;
Step 3: Open Command Window (Start Run cmd)
Step 4: Go to the following folder using CD command of DOS.
C:\Program files\Mysql\MySql server 5.1\Bin>
Step 5: type the following command on above prompt -
C:….\bin> mysql -u root -pais class12 <ais.sql This
will create a class12 database with required tables.
31
BANK MANAGEMENT SYSTEM
32
BANK MANAGEMENT SYSTEM
8 . References
In order to work on this project titled – BANK MANAGEMENT SYSTEM , the following
books and literature are referred by me during the various phases of development of
the project:
-by Shildit
– Gruber
(3) http://www.mysql.org /
(4) http://www.python.or g/
Other than the above -mentioned books, the suggestions and supervision of my teacher
and my classmates also helped me to develop this software project.
35