A simple banking system with various user functionalities, including user creation, login, balance management, and transaction features. This project is designed to demonstrate basic banking operations and ensure user security through validations.
- Submitted To: Training and Placement (TnP) Department
- Assessment Type: College Submission
- Submitted By: Nikhil Raikwar
- Enrollment Number: 0103IS221130
- Branch: CSE-IOT & CS
- Users can be added to the system with the following fields:
- Name
- Account Number: A randomly generated unique 10-digit number.
- Date of Birth (DOB): User's date of birth in the format
YYYY-MM-DD. - City: User's city of residence.
- Password: Properly validated password (minimum 8 characters, with at least one uppercase letter and one digit).
- Initial Balance: Minimum balance of 2000.
- Contact Number: User's 10-digit contact number.
- Email ID: User's email address.
- Address: User's physical address.
All fields undergo validation rules to ensure that user input is correct.
- Display information about users in a readable format.
- Users can log in by providing their account number and password.
- Once logged in, users can perform various actions:
- Show Balance: Display the current account balance.
- Show Transactions: View all transactions related to the user's account.
- Credit Amount: Deposit funds into the user's account.
- Debit Amount: Withdraw funds from the user's account (if sufficient balance exists).
- Transfer Amount: Transfer funds to another user's account.
- Activate/Deactivate Account: Change the status of the user's account to active or inactive.
- Change Password: Update the user's password.
- Update Profile: Modify personal details such as name, DOB, email, etc.
- Logout: End the session and log out of the system.
- Close the application.
-
users
name: User's name.account_number: Unique 10-digit account number.dob: User's date of birth.city: User's city of residence.password: User's password.balance: Current balance in the user's account.contact: User's contact number.email: User's email address.address: User's address.status: Account status (activeorinactive).
-
login
account_number: Unique 10-digit account number (used for login).password: User's password.
-
transactions
account_number: Account number related to the transaction.transaction_type: Type of transaction (credit,debit,transfer).amount: Amount involved in the transaction.transaction_date: Date and time of the transaction.
- Python 3.x
- MySQL Server
mysql-connectorPython library- Regular expression (for email, password, contact validation)
-
Clone or Download the Project:
- Clone the repository or download the
banking_system.pyfile.
- Clone the repository or download the
-
Install Dependencies:
- Install the required Python libraries by running:
pip install mysql-connector
- Install the required Python libraries by running:
-
Setup Database:
- Create a database called
banking_systemin your MySQL server:CREATE DATABASE banking_system;
- Use the provided table structure to create the necessary tables:
CREATE TABLE users ( name VARCHAR(100), account_number VARCHAR(10) PRIMARY KEY, dob DATE, city VARCHAR(50), password VARCHAR(50), balance DECIMAL(10, 2), contact VARCHAR(10), email VARCHAR(100), address TEXT, status VARCHAR(10) DEFAULT 'active' ); CREATE TABLE login ( account_number VARCHAR(10) PRIMARY KEY, password VARCHAR(50) ); CREATE TABLE transactions ( account_number VARCHAR(10), transaction_type VARCHAR(10), amount DECIMAL(10, 2), transaction_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
- Create a database called
-
Configure Database Credentials:
- In the Python code, replace the
host,user,password, anddatabaseparameters with your own MySQL server credentials:conn = mysql.connector.connect( host="localhost", user="root", password="your_password", database="banking_system" )
- In the Python code, replace the
-
Run the Application:
- Run the Python application:
python banking_system.py
- Run the Python application:
- Email: Must follow the format
username@domain.com. - Password: Minimum 8 characters, at least one uppercase letter, one lowercase letter, and one digit.
- Contact Number: Must be a valid 10-digit number.
- Initial Balance: Minimum balance should be 2000.
- Account Number: Automatically generated as a unique 10-digit number.
- Name: Only alphabetic characters and spaces.
- Fork this repository.
- Create a new branch for your feature or fix.
- Submit a pull request with a detailed description of the changes made.
This project is open-source and available under the MIT License.
- Inspired by real-world banking systems.
- Developed to demonstrate basic banking features with Python and MySQL.