Difference between revisions of "Storage Layout"

From BaseX Documentation
Jump to navigation Jump to search
(Created page with "==Data Types== * <code>Num</code>: compressed integer * <code>Token</code>: length (<code>Num</code>) and bytes of UTF8 byte representation ==inf.basex== {| class="wikitable" w...")
 
Line 1: Line 1:
 
==Data Types==
 
==Data Types==
* <code>Num</code>: compressed integer
+
* <code>Num</code>: compressed integer (1-5 bytes)
 
* <code>Token</code>: length (<code>Num</code>) and bytes of UTF8 byte representation
 
* <code>Token</code>: length (<code>Num</code>) and bytes of UTF8 byte representation
 +
* <code>double</code>: number, stored as token
 +
* <code>boolean</code>: boolean (1 byte, <code>00</code> or <code>01</code>)
  
 
==inf.basex==
 
==inf.basex==

Revision as of 16:07, 26 October 2011

Data Types

  • Num: compressed integer (1-5 bytes)
  • Token: length (Num) and bytes of UTF8 byte representation
  • double: number, stored as token
  • boolean: boolean (1 byte, 00 or 01)

inf.basex

Description Format Method
Disk Data Database meta information DiskData()
1. Meta Data Pairs of key/value tokens, suffixed by empty key:
PERM → User Permissions
MetaData.read()
Users.read()
2. Main memory indexes Pairs of key/value tokens, suffixed by empty key:
TAGS → Tag Index
ATTS → Attribute Index
PATH → Path Index
NS → Namespaces
DOCS → Document Index
DiskData()
2.1. Name Index (Element/attribute Names) Token set, enrichted with statistical information:
1. Token set: key array (Tokens), next/bucket/size arrays (Nums)
2. Content kind (Num)
2.1 Number: min/max (Doubles)
2.2. Category: number of entries (Num), entries (Tokens)
2.3 Number of entries (Num)
2.4 Leaf flag (Boolean)
2.5 Maximum text length (Double; should be Num)
Names()
TokenSet()
StatsKey()