[go: up one dir, main page]

0% found this document useful (0 votes)
16 views10 pages

Extended Bank Management Project Class12

The document outlines a project titled 'Bank Management System using Python and MySQL', which includes a certificate of completion, acknowledgments, and a detailed index. It describes the system's objectives, tools used, database schema, Python code implementation, features, learning outcomes, and future scope for enhancements. The project aims to facilitate basic banking operations through a command-line interface while integrating MySQL for data management.

Uploaded by

dhanunathi2008
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)
16 views10 pages

Extended Bank Management Project Class12

The document outlines a project titled 'Bank Management System using Python and MySQL', which includes a certificate of completion, acknowledgments, and a detailed index. It describes the system's objectives, tools used, database schema, Python code implementation, features, learning outcomes, and future scope for enhancements. The project aims to facilitate basic banking operations through a command-line interface while integrating MySQL for data management.

Uploaded by

dhanunathi2008
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/ 10

Bank Management System using Python

and MySQL
Name: [Your Name]

Class: XII

Roll Number: [Your Roll Number]

School: [Your School Name]

Session: 2024-25
Certificate
This is to certify that the investigatory project titled 'Bank Management System using
Python and MySQL' has been successfully completed by [Your Name], a student of Class XII,
during the academic year 2024–25. This project is submitted towards the partial fulfillment
of the requirements of the CBSE curriculum.

Signature of Teacher

Date: ____________
Acknowledgement
I would like to express my sincere gratitude to my Computer Science teacher for their
guidance and support throughout this project. I also thank my parents and friends for their
encouragement. This project would not have been possible without their help.
Index
1. Introduction

2. Objective

3. Tools and Technologies Used

4. MySQL Database Schema

5. Python Code Implementation

6. Features of the Project

7. Learning Outcomes

8. Conclusion

9. Bibliography
1. Introduction
The Bank Management System is a software application developed using Python and
MySQL. It is designed to manage basic banking operations such as account creation, deposit,
withdrawal, and balance inquiry. The system offers a command-line interface for user
interaction.

2. Objective
To design and implement a Bank Management System that can perform essential banking
operations, providing a user-friendly interface using Python and integrating MySQL for data
management.

3. Tools and Technologies Used


• Python 3.x

• MySQL

• mysql-connector-python

• VS Code / IDLE / PyCharm

• MySQL Workbench / CLI

4. MySQL Database Schema


```sql
CREATE DATABASE bank;
USE bank;

CREATE TABLE accounts (


acc_no INT PRIMARY KEY,
name VARCHAR(100),
balance FLOAT
);
```

5. Python Code Implementation

import mysql.connector

con = mysql.connector.connect(
host="localhost",
user="root",
password="your_password",
database="bank"
)
cursor = con.cursor()

def create_account():
acc_no = int(input("Enter Account Number: "))
name = input("Enter Name: ")
balance = float(input("Enter Initial Balance: "))
query = "INSERT INTO accounts (acc_no, name, balance) VALUES (%s, %s, %s)"
cursor.execute(query, (acc_no, name, balance))
con.commit()
print("Account created successfully.")

def deposit():
acc_no = int(input("Enter Account Number: "))
amount = float(input("Enter Deposit Amount: "))
cursor.execute("UPDATE accounts SET balance = balance + %s WHERE acc_no = %s",
(amount, acc_no))
con.commit()
print("Amount deposited successfully.")

def withdraw():
acc_no = int(input("Enter Account Number: "))
amount = float(input("Enter Withdrawal Amount: "))
cursor.execute("SELECT balance FROM accounts WHERE acc_no = %s", (acc_no,))
result = cursor.fetchone()
if result and result[0] >= amount:
cursor.execute("UPDATE accounts SET balance = balance - %s WHERE acc_no = %s",
(amount, acc_no))
con.commit()
print("Amount withdrawn successfully.")
else:
print("Insufficient balance or account not found.")

def check_balance():
acc_no = int(input("Enter Account Number: "))
cursor.execute("SELECT balance FROM accounts WHERE acc_no = %s", (acc_no,))
result = cursor.fetchone()
if result:
print(f"Current Balance: ₹{result[0]}")
else:
print("Account not found.")

def main():
while True:
print("\n--- Bank Management System ---")
print("1. Create Account")
print("2. Deposit Money")
print("3. Withdraw Money")
print("4. Check Balance")
print("5. Exit")

choice = int(input("Enter your choice: "))


if choice == 1:
create_account()
elif choice == 2:
deposit()
elif choice == 3:
withdraw()
elif choice == 4:
check_balance()
elif choice == 5:
print("Exiting...")
break
else:
print("Invalid choice!")

main()

6. Features of the Project


• Account creation with unique account number

• Deposit and withdrawal with balance checks

• Real-time updates in MySQL database

• Simple command-line interface

• Error handling for invalid inputs

7. Learning Outcomes
• Integration of Python with MySQL using connectors
• CRUD operations in SQL

• Real-world problem solving with programming

• Development of modular and menu-driven programs

8. Conclusion
The Bank Management System project helped in understanding how to connect Python
programs with databases. It also strengthened concepts of file handling, exception
management, and interactive programming.

9. Bibliography
• https://docs.python.org
• https://dev.mysql.com
• https://www.geeksforgeeks.org
• https://www.w3schools.com

10. System Design & Flowchart


The system design follows a modular approach. Each function in the code handles a specific
operation such as creating accounts, depositing, or withdrawing funds. A simple flowchart
of the main logic is as follows:

1. Start
2. Display Menu
3. Get User Choice
4. Execute Corresponding Function
5. Loop Until Exit
6. End

This modular and sequential approach ensures clarity, ease of debugging, and scalability of
the application.

11. Code Walkthrough and Explanation


The following section provides a line-by-line explanation of the Python code used in this
project.
1. Importing Libraries: The program begins by importing the mysql.connector library which
allows Python to connect to MySQL.
2. Establishing Connection: Using `mysql.connector.connect`, a connection is made to the
MySQL server.
3. Cursor Creation: `cursor()` is used to execute SQL commands.
4. Creating Account: Accepts input from user and inserts data using `INSERT INTO`.
5. Deposit/Withdraw: These functions use `UPDATE` statements to modify balances after
validating the account.
6. Exception Handling: Although basic, input validation ensures program robustness.

12. Screenshots and Output Description


Here are examples of program execution:

• Creating an account prompts the user to enter a name, account number, and initial
balance.
• After executing deposit or withdraw, it prints confirmation messages.
• Balance inquiry displays the current balance fetched from MySQL.
Screenshots of the interface and database will be included in the printed version.

13. Use Case Scenarios


• A user wants to open a new account and deposit ₹5000.

• A customer attempts to withdraw ₹2000, but has only ₹1000 balance.

• An administrator checks the current balance of a specific account.

• An invalid account number is entered, and the system handles it gracefully.

14. Project Analysis


This system has the potential to scale into a full-fledged banking application with additional
features such as:
- Transaction history logs
- User authentication and login system
- Loan and interest calculations
- Integration with GUI using Tkinter or a web framework like Flask

15. Future Scope


This project can be expanded to include:
• A web interface using Django or Flask
• Mobile app integration
• Real-time transaction alerts via email/SMS
• Support for multiple currencies and accounts
• Graphical analysis and reports
16. Additional Discussion Point 1
In this section, we analyze further improvements and applications of the bank management
system. We explore how real-time systems in banks use database locking, ACID properties,
and concurrent transactions.

Moreover, the system can benefit from cloud integration, data encryption, and compliance
with financial regulations.

17. Additional Discussion Point 2


In this section, we analyze further improvements and applications of the bank management
system. We explore how real-time systems in banks use database locking, ACID properties,
and concurrent transactions.

Moreover, the system can benefit from cloud integration, data encryption, and compliance
with financial regulations.

18. Additional Discussion Point 3


In this section, we analyze further improvements and applications of the bank management
system. We explore how real-time systems in banks use database locking, ACID properties,
and concurrent transactions.

Moreover, the system can benefit from cloud integration, data encryption, and compliance
with financial regulations.

19. Additional Discussion Point 4


In this section, we analyze further improvements and applications of the bank management
system. We explore how real-time systems in banks use database locking, ACID properties,
and concurrent transactions.

Moreover, the system can benefit from cloud integration, data encryption, and compliance
with financial regulations.

20. Additional Discussion Point 5


In this section, we analyze further improvements and applications of the bank management
system. We explore how real-time systems in banks use database locking, ACID properties,
and concurrent transactions.

Moreover, the system can benefit from cloud integration, data encryption, and compliance
with financial regulations.

You might also like