Skip to content

jcartw/buildadb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 

Repository files navigation

buildadb

Build a simple database. Based on cstack's DB tutorial: https://cstack.github.io/db_tutorial/.

B-Tree Insertion

  • Start with 1 root/leaf node (page 0) and insert in sorted order up to the max allowable records (13)
  • Upon the insertion of the next record:
    • Create a new node (page 1) and write the right-half of records into it while inserting the new record in the correct location to maintain sorted order.
    • Create a new node (page 2) and copy records from root node (original left half of page 0) into it.
    • Re-initialize root node (page 0) as an internal node and set left and right child pointers, pages 2 and 1, respectively.

Interesting findings

Main Reference

About

Build a simple database

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors