#416 · Primary category: Education & Research

write-you-a-vector-db

bustub database tutorial vector-database

build vector database extensions over Apache Datafusion and/or CMU-DB's BusTub system

Project last updated:08/30/26

GitHub Stars

791

Forks

28

Contributors

1

License

Apache-2.0

Why we included this project

This is a course rather than a drop-in tool, and the difference matters. You build a small in-memory vector database in Rust chapter by chapter, starting with an Arrow-backed table and a DataFusion optimizer rule and working up through IVFFlat, NSW, HNSW, and residual IVF-PQ. The material stays at the boundary where algorithms become database features, so you see the query planning and execution contracts that make SQL vector search work instead of treating it as a black box behind an API. Each implementation chapter ships starter code, focused tests, and a completed reference crate, and the course ends with a shared benchmark comparing Flat, IVFFlat, NSW, HNSW, and IVF-PQ on one Euclidean workload, reporting build time, recall, and p50/p99 latency. Engineers who want to understand how vector indexes behave under the hood, or who are weighing how to add vector support to an existing relational system, will get more from working through this than from reading API docs.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category