Build Datastores From Scratch

Learn how to build datastores from scratch with your favorite programming language! We'll cover how one might implement primitive versions of PostgreSQL, Redis, MongoDB, ElasticSearch, etc. using primitives of the language. Each lesson will cover one of these datastore technologies. For each lesson covering these tools, you will start with a basic data structure, wrap it with utilities, and continue to expand until we've achieved 'feature parity' with the original. Students will get to understand how these technologies are working under the hood, and be more confident when using the real versions.

Course Curriculum

Section 1. Build Datastores From Scratch

1. LESSON

Data Store Fundamentals

An introduction to the various types of data stores and their use-cases. Understanding the basics about SQL and NoSQL databases, and the differences between them. A brief overview of the databases to be implemented in the course: PostgreSQL, Redis, MongoDB, and ElasticSearch....

2. LESSON

Designing a Simple Key-Value Store

This lesson introduces the concept of Key-Value stores and guides you in implementing a simple version similar to Redis using the primitives of your programming language. By the end of this lesson, you'll understand how key-value databases work and the data structures underpinning them....

3. LESSON

Expanding Your Key-Value Store

Building upon our Simple Key-Value Store, we'll add additional utilities and features until we've achieved 'feature parity' with Redis. This includes implementing expiration times for keys and understanding how one would go about using least-recently-used (LRU) caching....

4. LESSON

Creating a Document-Oriented Database

Shifting gears to NoSQL databases, we'll learn about and implement a simple Document-Oriented Database similar to MongoDB. This involves understanding JSON-like documents and how to store, retrieve and query them efficiently....

5. LESSON

Enhancing your Document-Oriented Database

Further enhancing our Document-Oriented Database, we'll add additional features to bring it in line with MongoDB. This includes features such as indexing and various querying methods....

6. LESSON

Building a Relational Database System

Transitioning back to SQL, this lesson involves implementing a simple relational database similar to PostgreSQL. This also includes understanding the concept of relations, normal forms and relational algebra....

7. LESSON

Refining your Relational Database System

A deep dive into enhancing our simple relational database system. This includes implementing transactions, joins, triggers, stored procedures, and achieving ACID properties....

8. LESSON

Introducing Search Engine

In this lesson, we'll build a basic search engine similar to Elasticsearch. You'll understand how inverted indices work, how to provide full-text search, and basics about tokenization, stemming and ranking algorithms....

9. LESSON

Advancing your Search Engine

Finalizing our course with the development of our search engine by including extra features such as distributed search, faceted search, and implementing a basic relevance algorithm....