Time to practice. Open the Banking Portal and perform these exercises. For each one, do the action in the UI first, then verify it in the database using SQL. This is exactly what you will do on the job.
Exercise 1: Verify User Registration
Register a new user on the Banking Portal
Write a SELECT query to verify all fields were saved correctly
Check that the password is stored as a hash, not plain text
Verify the created_at timestamp is accurate (within a few seconds of when you registered)
Try registering with the same email again — does the UNIQUE constraint prevent it?
Exercise 2: Test Money Transfer
Note the balance of two accounts BEFORE the transfer
Transfer Rs 1,000 from Account A to Account B via the UI
Verify Account A balance decreased by Rs 1,000
Verify Account B balance increased by Rs 1,000
Check that a transaction record was created with correct details
Verify the sum of all account balances has not changed (conservation check)
Try transferring more than the available balance — what happens in the database?
Exercise 3: Structural Testing
Run DESCRIBE (or information_schema query) on the users table
List all constraints — PRIMARY KEY, FOREIGN KEY, NOT NULL, UNIQUE
Try inserting a NULL value into a NOT NULL column — does it fail?
Try inserting a duplicate email — does the UNIQUE constraint catch it?
Check if indexes exist on frequently queried columns (email, account_number)
Exercise 4: Find the Bugs
Write SQL queries to detect each of the following bugs in the database. Report what you find.
Find any users with NULL or empty email addresses
Find any orders with total_amount = 0 or NULL
Find any orphan orders (orders that belong to non-existent users)
Find any duplicate email addresses in the users table
Check if phone numbers have consistent format and length
Exercise 5: Write a Database Test Plan
Pick any feature from the Banking Portal (bill payment, transaction history, account settings). Write 10 database test scenarios covering:
3 structural test scenarios (schema, constraints, data types)
4 functional test scenarios (CRUD operations, business rules)
3 non-functional test scenarios (performance, security, edge cases)
Do not just read the exercises. Actually do them. Open DBeaver or pgAdmin, connect to the database, and run the queries. The difference between a QA engineer who "knows SQL" and one who "can write SQL" is practice.