Changes

Jump to navigation Jump to search
No change in size ,  15:14, 26 May 2012
m
Text replace - "{{Mono|" to "{{Code|"
| {{Type|Num}}
| Compressed integer (1-5 bytes), specified in [https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/util/Num.java Num.java]
| {{MonoCode|15}} → {{MonoCode|0F}}; {{MonoCode|511}} → {{MonoCode|41 FF}}<br/>
|-
| {{Type|Token}}
| Length ({{Type|Num}}) and bytes of UTF8 byte representation
| {{MonoCode|Hello}} → {{MonoCode|05 48 65 6c 6c 6f}}
|-
| {{Type|Double}}
| Number, stored as token
| {{MonoCode|123}} → {{MonoCode|03 31 32 33}}
|-
| {{Type|Boolean}}
| Boolean (1 byte, {{MonoCode|00}} or {{MonoCode|01}})| {{MonoCode|true}} → {{MonoCode|01}}
|-
| {{Type|Nums}}, {{Type|Tokens}}, {{Type|Doubles}}
| Arrays of values, introduced with the number of entries
| {{MonoCode|1,2}} → {{MonoCode|02 01 31 01 32}}
|-
| {{Type|TokenSet}}
=Database Files=
The following tables illustrate the layout of the BaseX database files. All files are suffixed with {{MonoCode|.basex}}.
==Meta Data, Name/Path/Doc Indexes: {{MonoCode|inf}}==
{| class="wikitable" width="100%"
|-
| '''1. Meta Data'''
| 1. Key/value pairs, in no particular order ({{Type|Token}}/{{Type|Token}}):<br/>&nbsp; &bull; Examples: {{MonoCode|FNAME}}, {{MonoCode|TIME}}, {{MonoCode|SIZE}}, ...<br />&nbsp; &bull; {{MonoCode|PERM}} → Number of users ({{Type|Num}}), and name/password/permission values for each user ({{Type|Token}}/{{Type|Token}}/{{Type|Num}})<br/>2. Empty key as finalizer
| [https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/data/DiskData.java DiskData()]<br/>[https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/data/MetaData.java MetaData()]<br/>[https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/core/Users.java Users()]
|-
| '''2. Main memory indexes'''
| 1. Key/value pairs, in no particular order ({{Type|Token}}/{{Type|Token}}):<br />&nbsp; &bull; {{MonoCode|TAGS}} → Tag Index<br />&nbsp; &bull; {{MonoCode|ATTS}} → Attribute Name Index<br />&nbsp; &bull; {{MonoCode|PATH}} → Path Index<br />&nbsp; &bull; {{MonoCode|NS}} → Namespaces<br />&nbsp; &bull; {{MonoCode|DOCS}} → Document Index<br/>2. Empty key as finalizer
| [https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/data/DiskData.java DiskData()]
|-
|-
| '''2 b) Path Index'''
| 1. Flag for path definition ({{Type|Boolean}}, always {{MonoCode|true}}; legacy)<br/>2. PathNode:<br/>2.1. Name reference ({{Type|Num}})<br/>2.2. Node kind ({{Type|Num}})<br/>2.3. Number of occurrences ({{Type|Num}})<br/>2.4. Number of children ({{Type|Num}})<br/>2.5. {{Type|Double}}; legacy, can be reused or discarded<br/>2.6. Recursive generation of child nodes (→ 2)
| [https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/index/path/PathSummary.java PathSummary()]<br/>[https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/index/path/PathNode.java PathNode()]
|-
|}
==Node Table: {{MonoCode|tbl}}, {{MonoCode|tbli}}==
* {{MonoCode|tbl}}: Main database table, stored in blocks.* {{MonoCode|tbli}}: Database directory, organizing the database blocks.
Some more information on the [[Node table storage]] is available.
==Texts: {{MonoCode|txt}}, {{MonoCode|atv}}==
* {{MonoCode|txt}}: Heap file for text values (document names, string values of texts, comments and processing instructions)* {{MonoCode|atv}}: Heap file for attribute values.
==Value Indexes: {{MonoCode|txtl}}, {{MonoCode|txtr}}, {{MonoCode|atvl}}, {{MonoCode|atvr}}==
'''Text Index:'''
* {{MonoCode|txtl}}: Heap file with ID lists.* {{MonoCode|txtr}}: Index file with references to ID lists.The '''Attribute Index''' is contained in the files {{MonoCode|atvl}} and {{MonoCode|atvr}}; it uses the same layout.
==Full-Text Fuzzy Index: {{MonoCode|ftxx}}, {{MonoCode|ftxy}}, {{MonoCode|ftxz}}==
...will soon be reimplemented.
==Full-Text Trie Index: {{MonoCode|ftxa}}, {{MonoCode|ftxb}}, {{MonoCode|ftxc}}==
...will soon be dismissed.
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu