Write a relational database from scratch
# meta command
.exit
.btree
.constants
# database operation
insert [id] [name] [email]
select
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
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