- Explain the difference between DBMS and RDBMS and why relational databases dominate enterprise software
- Describe how the Storage Manager and Query Processor work together to execute your SQL
- Identify all core database objects: tables, views, indexes, stored procedures, and triggers
- Distinguish between OLTP (daily app transactions) and OLAP (reporting and analytics) databases
- Understand the 3-tier architecture that separates your app from the physical data storage
- Install MS SQL Server and connect to it using SSMS without any errors
- Create and navigate databases using the graphical management interface
- Choose between CHAR, VARCHAR, INT, DECIMAL, DATE, and other types for any column
- Explain why CHAR uses fixed memory while VARCHAR only uses what it needs
- Handle NULL values correctly so queries never return unexpected empty results
- Create a complete table with correct column definitions and data types from scratch
- Add, modify, or remove columns from an existing table without losing stored data
- Understand TRUNCATE (wipe rows fast, keep structure) versus DROP (delete everything including structure)
- Use IDENTITY columns to auto-generate sequential ID values
- Correctly categorise SQL commands: DDL builds structure, DML handles data
- Define PRIMARY KEY to uniquely identify every row in a table
- Link two tables using FOREIGN KEY so orphaned data cannot be created
- Write CHECK constraints to enforce business rules at the database level
- Use UNIQUE to prevent duplicate values in non-primary-key columns
- Apply NOT NULL and DEFAULT to ensure data completeness automatically
- Add constraints to existing tables using ALTER TABLE without recreating them
- Retrieve specific columns and filter rows to find exactly the data you need
- Search for text patterns using LIKE with % (any text) and _ (any single character) wildcards
- Filter by ranges (BETWEEN), lists (IN), and missing values (IS NULL)
- Combine multiple conditions correctly using AND, OR, NOT with proper operator priority
- Write conditional column output using CASE WHEN for on-the-fly data transformation
- Sort query results by any column in ascending or descending order
- Group rows by a category and calculate summary statistics per group
- Use COUNT, SUM, AVG, MIN, MAX to verify aggregated values in the application UI
- Filter groups using HAVING (e.g. only show departments with more than 5 employees)
- Clearly explain the difference: WHERE filters rows before grouping, HAVING filters groups after
- Insert one or many rows of test data into a table quickly using INSERT INTO
- Copy data from one table into another using INSERT INTO … SELECT
- Update specific rows safely using UPDATE with WHERE — never accidentally updating everything
- Delete only the rows you want using DELETE with a precise WHERE condition
- Set up and tear down test data efficiently as part of your testing workflow
- Join two tables and return only rows that match in both using INNER JOIN
- Include unmatched rows from one table with NULLs for the missing side using LEFT/RIGHT JOIN
- Find records that exist in one table but have no related record in another — a critical testing check
- Write 3-table JOIN queries for complex end-to-end data verification
- Choose the right JOIN type by reading a Venn diagram representation
- Write subqueries to answer two-step data verification questions in a single SQL statement
- Use EXISTS to efficiently check whether a related record exists without pulling all data
- Stack two query results together using UNION (distinct) or UNION ALL (all rows)
- Find records in both result sets using INTERSECT or only in one using EXCEPT
- Use CTEs (WITH clause) to break complex queries into readable, named building blocks
- Read ER diagrams to understand how a real application database is structured
- Model one-to-one, one-to-many, and many-to-many relationships using correct table designs
- Apply 1NF: ensure each cell holds one value and there are no repeating column groups
- Apply 2NF: every non-key column depends on the whole primary key, not just part of it
- Apply 3NF: non-key columns cannot depend on other non-key columns
- Identify when a performance trade-off justifies intentional denormalization
- Create views to save and reuse complex queries as if they were tables
- Explain the difference between a clustered index (affects row storage order) and non-clustered index (a separate lookup structure)
- Add indexes to dramatically speed up slow queries and drop them when no longer needed
- Write stored procedures with input parameters and execute them using EXEC
- Create scalar functions that return a single calculated value for use in queries
- Use sp_help and sp_helptext to inspect database object definitions in SQL Server
- Group multiple SQL commands into one transaction that either fully succeeds or fully fails
- Undo all changes in a transaction using ROLLBACK when an error occurs mid-way
- Set a partial undo checkpoint inside a transaction using SAVEPOINT
- Explain ACID properties (Atomicity, Consistency, Isolation, Durability) confidently in interviews
- Create triggers that fire automatically after data is inserted, updated, or deleted
- Write test-support SQL queries to generate test data and verify application database state
Interview Preparation Tips
DELETE vs TRUNCATE vs DROP
DELETE is transactional — it fires triggers and can be rolled back. TRUNCATE removes all rows fast with no rollback and does not fire row-level triggers. DROP removes the table completely — structure and all data gone.
WHERE vs HAVING
WHERE filters individual rows before grouping. HAVING filters groups after GROUP BY. You cannot use aggregate functions (COUNT, SUM) in a WHERE clause — that is exactly what HAVING is for.
INNER JOIN vs LEFT JOIN
INNER JOIN returns only rows with a match in both tables. LEFT JOIN returns all rows from the left table, with NULL for the right side where no match exists — essential for finding missing related records.
Normalisation in QA
Testers must understand 1NF/2NF/3NF to write correct database validation queries, verify data integrity rules, and identify schema design defects before they cause production bugs.
UNION vs UNION ALL
UNION combines two result sets and removes duplicates (slower). UNION ALL combines them and keeps all rows including duplicates (faster). Both require matching column counts and compatible data types.
ACID in Testing
Atomicity — all or nothing. Consistency — valid state before and after. Isolation — concurrent transactions do not interfere. Durability — committed data survives crashes. Test all four properties in data-critical features.
- Basic SELECT syntax review
- Data types recap (CHAR vs VARCHAR)
- DDL commands quick reference
- DML commands quick reference
- JOIN types visual recap
- Aggregate functions cheat sheet
- TCL commands (COMMIT / ROLLBACK / SAVEPOINT)
- Constraint types summary