8000 GitHub - ksd11/own-db
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ksd11/own-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Write a relational database from scratch

tutorial

# meta command
.exit
.btree
.constants

# database operation
insert [id] [name] [email]
select

Layout

leaf node

1 1 4 4
node_type is_root parent_pointer num_keys
4 293
key0 value0
key0 value0
... ...
key12 value12

total size = 10+(293+4)*13+225=4096

225 Bytes is padding

internal node

1 1 4 4 4
node_type is_root parent_pointer num_keys right_child pointer
4 293
pointer0 key0
pointer1 key1
... ...
pointer509 key509

total size = 14+(4+4)*510+2=4096

2 Bytes is padding

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0