A console-based Java Banking System using JDBC and MySQL. Features include user registration, account creation, balance inquiry, debit, credit, and fund transfer with secure authentication and transaction management. Ideal for learning JDBC, SQL integration, and backend banking workflows.
A simple yet fully functional Banking Management System built using Java and JDBC (MySQL).
This console-based application allows users to securely manage their bank accounts β including registration, account management, and transactions.
- β User Registration & Login Authentication
- β Open a New Bank Account (with secure PIN)
- β Debit & Credit Money from Account
- β Transfer Money between Accounts
- β Check Account Balance
- β SQL Transaction Management (Atomicity & Consistency)
- β JDBC Prepared Statements (SQL Injection Safe)
- Java 17+
- JDBC (Java Database Connectivity)
- MySQL 8.0+
- SQL (Structured Query Language)
JDBC.Projects.Bank.bANK βββ AccountManager.java # Handles all banking operations (debit, credit, transfer, balance) βββ Accounts.java # Manages account creation and account info βββ User.java # Handles user registration & login βββ App.java # Entry-point / Main application
2οΈβ£ Create MySQL Database & Tables Run the following SQL queries in your MySQL server: CREATE DATABASE test; USE test;
CREATE TABLE User ( id INT AUTO_INCREMENT PRIMARY KEY, full_name VARCHAR(100) NOT NULL, email VARCHAR(100) UNIQUE NOT NULL, password VARCHAR(100) NOT NULL );
CREATE TABLE Accounts ( account_number BIGINT PRIMARY KEY, full_name VARCHAR(100) NOT NULL, email VARCHAR(100) NOT NULL, balance DOUBLE NOT NULL, security_pin VARCHAR(10) NOT NULL );
3οΈβ£ Configure Database Credentials In App.java, update the following variables with your MySQL credentials: private static final String url = "jdbc:mysql://localhost:3306/test"; private static final String username = "root"; private static final String password = "your_mysql_password";
β¨ Usage Action Description Register Create a user account Open Account Open a bank account linked to your email Debit Money Withdraw money from your account Credit Money Deposit money into your account Transfer Money Send money to another account Check Balance View your current balance Log Out End session securely
π‘οΈ Security Highlights Password and PIN verification before sensitive operations
SQL Prepared Statements to prevent SQL Injection
Atomic Transactions with commit & rollback for safe fund transfers