diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-01-21 16:09:57 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-01-21 16:09:57 -0700 |
commit | f846d20b2fbdc39036acc1e1603acb2e6363e59f (patch) | |
tree | 9d72bcb900ed14aae35aa47ad90a678bd81d8db0 | |
parent | Update README.md (diff) | |
download | dedo-f846d20b2fbdc39036acc1e1603acb2e6363e59f.tar.gz dedo-f846d20b2fbdc39036acc1e1603acb2e6363e59f.tar.xz |
Update README.md
-rw-r--r-- | README.md | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -150,3 +150,24 @@ err := c.Delete([]byte("foo")) err := c.DeleteString("foo") ``` + +## Internals + +The Bolt database is meant to be a clean, readable implementation of a fast single-level key/value data store. +This section gives an overview of the basic concepts and structure of the file format. + +### Pages + +Bolt stores its data in discrete units called pages. +The page size can be configured but is typically between 4KB and 32KB. + +There are several different types of pages: + +* Meta pages - The first two pages in a database are meta pages. These are used to store references to root pages for system buckets as well as keep track of the last transaction identifier. + +* Branch pages - These pages store references to the location of deeper branch pages or leaf pages. + +* Leaf pages - These pages store the actual key/value data. + +* Overflow pages - These are special pages used when a key's data is too large for a leaf page and needs to spill onto additional pages. + |