A comprehensive and user-friendly bank system simulation designed using Python and SQL Server as the final project for Database Design course.
Final Project of Database Design Principles
Under The Supervision of Dr. Zahra Pourbahman
Fall 2023 - Amir Kabir University Of Technology
This project implements a complete banking system with secure user authentication, multiple account management, and three different transaction methods while adhering to banking regulations and daily transfer limits.
- Database: SQL Server
- Backend: Python 3.x
- Additional Libraries: pyodbc, datetime, hashlib
- ✅ Secure user registration with unique national code and username validation
- ✅ Password hashing using SHA-256 for enhanced security
- ✅ User authentication and session management
- ✅ Create multiple bank accounts per user
- ✅ Generate unique card numbers and Sheba numbers for each account
- ✅ View all accounts associated with a user
- ✅ Card-to-Card transfers with daily limit of 10 million Tomans
- ✅ SATNA transfers to destination Sheba numbers with daily limits
- ✅ PAYA transfers to destination Sheba numbers with daily limits
- ✅ Comprehensive transaction history tracking
- ✅ Unique tracking codes for all transactions
- ✅ View last N transactions for any account
- ✅ Verify transaction validity using tracking codes
- ✅ Access control (users can only see their own transactions)
The database includes the following tables with proper relationships:
- Users 👥 (UserID, FirstName, LastName, NationalCode, Username, PasswordHash)
- Accounts 💳 (AccountID, UserID, CardNumber, ShebaNumber, Balance)
- Transactions 🔄 (TransactionID, SourceAccountID, DestinationAccountID, Amount, Type, Status, DateTime, TrackingCode)
- DailyLimits ⚖️ (LimitID, AccountID, TransactionType, DailyAmount, Date)
- Prerequisites: Ensure you have SQL Server installed and running
- Database Setup: Execute the provided SQL script to create the database and tables
- Install Dependencies:
pip install pyodbc - Run Application: Execute the Python script and follow the menu prompts
- Triggers ⚡: Implemented for maintaining transaction integrity and updating balances
- Input Validation 🛡️: Comprehensive validation for all user inputs
- Error Handling ❌: Graceful error handling with user-friendly messages
- Daily Limit Enforcement 📅: Automatic reset of daily limits at midnight