Skip to content

kfigon/simple-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clone of sqlite

based on chidb from university of chicago

sqlite sourcecode

db

single file - sequence of pages. Page is our storage unit, being a set of disk blocks. Different kind of pages - tables, indexes etc.

btree page == btree node. Each pointer is just a page ID

page internally is a slotted page - this way we can store variable size data in a page, inserts and sorting is easy. Slotted index grows to the end of the page, Cell data grows to the beginning. Page has a header to point what's inside

Overflow page - linked list of pages to store bigger data

table is set of pages Row format - each Cell is just a row, sequence of bytes.

mostly inserts and reads are allowed. Updates are allowed, but not optimized and can be inefficient.

btree

b - balanced

  • b+ trees for table data
    • like Btree in which each node contains only keys (not key–value pairs), and to which an additional level is added at the bottom with linked leaves
  • btrees for indexes

real project start 17.09.24

materials

btree:

About

relational database implementation for learning purposes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published