How Does a Database Work?

https://cstack.github.io/db_tutorial/

Writing a sqlite clone from scratch in C

Overview

View on GitHub (pull requests welcome)

  • What format is data saved in? (in memory and on disk)
  • When does it move from memory to disk?
  • Why can there only be one primary key per table?
  • How does rolling back a transaction work?
  • How are indexes formatted?
  • When and how does a full table scan happen?
  • What format is a prepared statement saved in?

In short, how does a database work?

I’m building a clone of sqlite from scratch in C in order to understand, and I’m going to document my process as I go.

“What I cannot create, I do not understand.” – Richard Feynman

sqlite architecture (https://www.sqlite.org/arch.html)
sqlite architecture (https://www.sqlite.org/arch.html)

Leave a Reply

Your email address will not be published. Required fields are marked *

Next Post

Why AMD EPYC Rome 2P Will Have 128-160 PCIe Gen4 Lanes and a Bonus

Fri Apr 5 , 2019
https://www.servethehome.com/why-amd-epyc-rome-2p-will-have-128-160-pcie-gen4-lanes-and-a-bonus/

You May Like