Essential interview questions for skilled SQL and database programmers

What are the key questions that every competent SQL and database developer should know how to answer?

I’m putting together a list of fundamental topics that experienced database professionals should be comfortable discussing. This could include anything from basic SQL syntax and query optimization to more advanced concepts like normalization, indexing strategies, transaction management, and performance tuning.

I’m particularly interested in questions that would help distinguish between junior and senior level database developers. What topics do you think are absolutely essential for someone working with databases and SQL to understand thoroughly?

If you were interviewing candidates for a database developer position, what would be your go-to questions to assess their real-world knowledge and problem-solving abilities?

Ask candidates how they’d fix a query that suddenly went from fast to slow. This tests their knowledge of execution plans, indexing, and troubleshooting skills all at once. Next, have them design a database schema for a real business scenario, then dig into edge cases and what they’d change. You’ll quickly see if they understand normalization and the practical trade-offs that come with it. Finally, throw some data integrity problems at them involving concurrent transactions. Their answers will show whether they actually get ACID principles or just know the buzzwords.

i’d focus on deadlocks - have them explain what they are and how to prevent them. shows whether they actually get concurrency. also ask about join types and when to use EXISTS vs IN. these questions separate juniors from seniors fast since it’s stuff they handle every day.

what’s your take on stored procedures vs application logic? where do you draw the line between what the database should handle versus the app?

do you test window functions? that’s usually where i can tell if someone actually knows SQL or just does basic CRUD stuff.