Computer Science Fundamentals
Databases (Theory)
6 practice questions. Free questions open a full answer guide; the rest unlock with Pro.
- In a relational database, what's the difference between a primary key and a foreign key, and what does referential integrity give you?
- A query on a large table is slow. Walk me through how you'd decide what index to add and what the trade-offs are.Go Pro
- Two users update the same record at the same time. Walk me through how a database's isolation level decides what they each see.Go Pro
- What does it mean to normalize a database schema, and why would a team sometimes deliberately denormalize?Go Pro
- Walk me through how you'd choose a transaction isolation level for a new service, and what anomaly snapshot isolation still lets through.Go Pro
- A read-heavy table has grown to where one query is slow despite an index. Walk me through how you'd reason about whether to add an index, denormalize, or partition.Go Pro
Want questions matched to your role? Paste a job title, job description, or CV for a personalized set, or go Pro to unlock the full bank.