Tasks
Implement Hash Index
Build a hash index that maps keys to data file offsets: 1. Hash each key to a bucket 2. Store key and file offset in the bucket 3. Lookup returns the...
Build B-Tree Index
Implement a B-Tree index supporting both point and range queries: 1. Internal nodes contain keys and child pointers 2. Leaf nodes contain keys and da...
Implement LSM Tree
Build a Log-Structured Merge Tree (LSM Tree): 1. Writes go to in-memory memtable (sorted structure) 2. When memtable is full, flush to SSTable on dis...
Add Secondary Indexes
Implement secondary indexes for non-key attributes: 1. Primary index: primary_key -> data 2. Secondary index: attribute_value -> list of primary_keys...
Distribute Index Across Nodes
Distribute your index across multiple nodes: 1. Partition index entries by key (hash or range) 2. Point lookups go to single partition 3. Range queri...
Interview Prep
Common interview questions for Database / Backend Engineer roles that map directly to what you build in this track. Click any question to reveal the model answer.
Questions are representative of real interview patterns. Model answers are starting points — adapt them with your own experience and the specific context of the interview.
Common Mistakes
The top 5 mistakes builders make in this track — and exactly how to fix them. Click any mistake to see the root cause and the correct approach.
Comparison Mode
Side-by-side comparisons of the approaches, algorithms, and trade-offs you encounter in this track. Expand any comparison to see a detailed breakdown.
Concepts Covered
Prerequisites
It is recommended to complete the previous tracks before starting this one. Concepts build progressively throughout the curriculum.
Rabbit Holes
For when you want to go deeper. Curated papers, posts, and talks beyond what this track covers.
The Anatomy of a Database Index
Markus Winand's free book on database indexes written for application developers. The B-Tree chapters are the best explanation of why queries with the wrong index are slower than no index at all.
Inverted Indexes and Information Retrieval (Manning et al.)
Introduction to Information Retrieval, freely available online. Chapters 1-4 cover the inverted index, Boolean retrieval, and TF-IDF. The text search component you built is a simplified version of what this book describes.
LevelDB Implementation Notes on Compaction
How LevelDB decides when and what to compact in its LSM-Tree. Compaction strategy determines write amplification, space amplification, and read performance. This section is the practical payoff for understanding the data structure you built.
Building a Full-Text Search Engine in 150 Lines of Python
A distilled, readable implementation of inverted index construction, TF-IDF scoring, and query processing. Reading this after building your own index reveals exactly where your implementation made simplifying assumptions.