Difference between revisions of "Storage Layout"
Jump to navigation
Jump to search
| Line 28: | Line 28: | ||
|- | |- | ||
| valign='top' | '''2.1. Name Index'''<br/>Element/attribute names | | valign='top' | '''2.1. Name Index'''<br/>Element/attribute names | ||
| − | | Token set, | + | | Token set, enriched with statistical information:<br />1. Token set: key array (<code>Tokens</code>), next/bucket/size arrays (<code>Nums</code>)<br />2. Content kind (<code>Num</code>)<br />2.1. Number: min/max (<code>Doubles</code>)<br />2.2. Category: number of entries (<code>Num</code>), entries (<code>Tokens</code>)<br />2.3. Number of entries (<code>Num</code>)<br />2.4. Leaf flag (<code>Boolean</code>)<br />2.5. Maximum text length (<code>Double</code>; legacy, could be <code>Num</code>) |
| − | | valign='top' | [https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/index/Names.java Names()]<br/>[https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/util/hash/TokenSet.java TokenSet()]<br/>[https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/index/StatsKey.java StatsKey()] | + | | valign='top' | [https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/index/Names.java Names()]<br/>[https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/util/hash/TokenSet.java TokenSet.read()]<br/>[https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/index/StatsKey.java StatsKey()] |
|- | |- | ||
| valign='top' | '''2.2. Path Index''' | | valign='top' | '''2.2. Path Index''' | ||
| − | | | + | | 1. Flag for path definition (<code>Boolean</code>, always <code>true</code>; legacy)<br/>2. PathNode:<br/>2.1. Name reference (<code>Num</code>)<br/>2.2. Node kind (<code>Num</code>)<br/>2.3. Number of occurrences (<code>Num</code>)<br/>2.4. Number of children (<code>Num</code>)<br/>2.5. <code>Double</code>; legacy, can be reused or discarded<br/>2.6. Recursive generation of child nodes (→ 2)<code> |
| − | | | + | | [https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/index/path/PathSummary.java PathSummary()] |
|} | |} | ||
Revision as of 16:54, 26 October 2011
Version: 7.0
Data Types
Num: compressed integer (1-5 bytes)Token: length (Num) and bytes of UTF8 byte representationdouble: number, stored as tokenboolean: boolean (1 byte,00or01)
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, enriched 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; legacy, could be Num)
|
Names() TokenSet.read() StatsKey() |
| 2.2. Path Index | 1. Flag for path definition (Boolean, always true; legacy)2. PathNode: 2.1. Name reference ( Num)2.2. Node kind ( Num)2.3. Number of occurrences ( Num)2.4. Number of children ( Num)2.5. Double; legacy, can be reused or discarded2.6. Recursive generation of child nodes (→ 2)
|
PathSummary() |