summaryrefslogtreecommitdiff
path: root/docs/html/xbc6.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/html/xbc6.html')
-rwxr-xr-xdocs/html/xbc6.html153
1 files changed, 153 insertions, 0 deletions
diff --git a/docs/html/xbc6.html b/docs/html/xbc6.html
new file mode 100755
index 0000000..094545f
--- /dev/null
+++ b/docs/html/xbc6.html
@@ -0,0 +1,153 @@
+<!DOCTYPE HTML PUBLIC>
+<HTML>
+<TITLE>Xbase DBMS Chapter 6</TITLE>
+<BODY BGCOLOR=#FFFFFF>
+<H1><p align="center">Index Overview</p></H1>
+<p align="center">Chapter Updated 12/09/22</p><hr>
+
+The objective of this chapter is to provide information regarding
+the basic concepts of index processing for the Xbase library.<br><br>
+
+
+<h2>Overview</h2>
+
+The Xbase library is designed to support multiple index types simultaneously.
+Dbase, Clipper and Foxbase each had their own index formats and ultimately the
+goal is to provide support for all the legacy index file formats.
+
+<br><br>
+The 4.0.x rewrite includes the NDX and MDX formats. Earlier versions of the
+library included NTX and CDX formats which will be brought forward into the
+library rewrite at some point in the future.
+
+
+<h2>Tags</h2>
+
+Each index file contains one or more tags depending on the file type. Each tag is a sort order
+and has characteristics: Sort order (ASC or DESC), unique or not unique and some formats support filtering.
+Each open table (dbf file) has an "active tag" for database operations.
+
+<h2>Index processing design</h2>
+
+The library is construcuted to handle index files with multiple tags per file. Single tag files like the NDX indices
+are treated as a multi tag file, but there is only one tag. This allows for maximum flexibility for future
+additional index types.
+
+
+
+<h2>Index updates</h2>
+
+The library automatically updates all tags in all open index files.
+
+
+<br><br>
+<h2>Index File Types</h2>
+
+<table border=1>
+<tr><th>File<br>Type</th><th>Source</th><th>Max Tags<br>Per File</th><th>Auto Opened</th><th>Sort Order</th><th>Unique Keys</th>
+ <th>Reclaimed Nodes</th><th>Filter Support</th><th>Status</th></tr>
+<tr>
+ <td>NDX</td><td>dBase</td>
+ <td><center>1</center></td>
+ <td><center>Optional</center></td>
+ <td>ASC only</td>
+ <td><center>Y</center></td>
+ <td><center>N</center></td>
+ <td><center>N</center></td>
+ <td><center>Available in 4.0.1</center></td>
+</tr>
+<tr>
+ <td>MDX</td><td>dBase</td>
+ <td><center>47</center></td>
+ <td><center>Yes</center></td>
+ <td><center>ASC or DESC</center></td>
+ <td><center>Y</center></td>
+ <td><center>Y</center></td>
+ <td><center>Y</center></td>
+ <td><center>Available in 4.0.1</center></td>
+</tr>
+<tr>
+ <td>NTX</td>
+ <td>Clipper</td>
+ <td><center>1</center></td>
+ <td><center>Optional</center></td>
+ <td><center>?</center></td>
+ <td><center>?</center></td>
+ <td><center>?</center></td>
+ <td><center>?</center></td>
+ <td><center>Pending upgrades</center></td>
+</tr>
+<tr>
+ <td>CDX</td>
+ <td>Fox Pro</td>
+ <td><center>?</center></td>
+ <td><center>?</center></td>
+ <td><center>?</center></td>
+ <td><center>?</center></td>
+ <td><center>?</center></td>
+ <td><center>?</center></td>
+ <td><center>Pending upgrades</center></td>
+<tr>
+<tr>
+ <td>IDX</td><td>Fox Pro</td><td></td><td></td><td></td><td></td><td></td><td></td><td>Undeveloped</td>
+<tr>
+
+</table>
+
+<br><br>
+<h2>Index/Tag Methods</h2>
+<table border=1>
+<tr><th>Method</th><th>Description</th></tr>
+
+<tr>
+ <td>xbDbf::CheckTagIntegrity</td><td>Checks a tag for missing or duplicate entries. Available if XB_DEBUG_SUPPORT is on.</td>
+</tr>
+<tr>
+ <td>xbDbf::CreateTag</td><td>Create a new tag.</td>
+</tr>
+<tr>
+ <td>xbDbf::DeleteTag</td><td>Delete existing tag.</td>
+</tr>
+<tr>
+ <td>xbDbf::Find</td><td>Find key value for the active tag.</td>
+</tr>
+<tr>
+ <td>xbDbf::GetFirsKey</td><td>Retrieve the first key for the active tag.</td>
+</tr>
+<tr>
+ <td>xbDbf::GetLastKey</td><td>Retrieve the last key for the active tag.</td>
+</tr>
+<tr>
+ <td>xbDbf::GetNextKey</td><td>Retrieve the next key for the active tag.</td>
+</tr>
+<tr>
+ <td>xbDbf::GetPrevKey</td><td>Retrieve the previous key for the active tag.</td>
+</tr>
+<tr>
+ <td>xbDbf::GetCurTag</td><td>Retrieve the tag name key for the active tag.</td>
+</tr>
+<tr>
+ <td>xbDbf::OpenIndex</td><td>Open an index file. Only used for index files that aren't automatically opened.</td>
+</tr>
+<tr>
+ <td>xbDbf::Reindex</td><td>Rebuild a tag. Available if XB_DEBUG_SUPPORT is on.</td>
+</tr>
+<tr>
+ <td>xbDbf::SetCurTag</td><td>Set current tag.</td>
+</tr>
+</table>
+<br><br>
+<h2>Internal Data Storage</h2>
+
+<table border=1>
+<tr><th>Type<th>Stored in DBF as</th><th>Stored in NDX as</th><th>Stored in MDX as</th></tr>
+<tr><td>C</td><td>Character data</td><td>Character data</td><td>Character data</td></tr>
+<tr><td>F</td><td>Text numbers</td><td>xbDouble</td><td>xbBcd</td></tr>
+<tr><td>N</td><td>Text numbers</td><td>xbDouble</td><td>xbBcd</td></tr>
+<tr><td>D</td><td>Text YYYYMMDD</td><td>xbDouble Julian</td><td>xbDouble Julian</td></tr>
+</table>
+<br><br>
+<hr>
+<p><img src="xbase.jpg"><br><hr>
+</BODY>
+</HTML>