eXtremeDB Indexes and Cursors

The process of gaining access to objects stored in eXtremeDB is called navigation. Like other databases, eXtremeDB uses indexes to navigate to objects based on key values. (Please see the Indexes web page for brief feature descriptions of the variety of specialized eXtremeDB indexes.)

eXtremeDB also supports the traditional definition of cursors: i.e. a cursor is an entity that represents a position in a set of database objects resulting from an index search operation.

Any index declared for a class adds performance overhead when adding or deleting a key during insert, update or delete operations. This overhead multiplies for each of the indexes whose key is affected; so care should be taken to avoid declaring indexes where they are not really needed.

Index Types

As explained in the Fundamental Concepts, eXtremeDB provides a number of specialized indexes to facilitate particular types of database search and navigation. Please use the links in the following table for explanations and examples demonstrating the different index capabilities:

B-Tree Introduction to B-Tree indexes
Patricia Trie Introduction to Patricia Trie indexes; example managing IP addresses
R-Tree Introduction to R-Tree indexes; example using spatial coordinates
KD-Tree Introduction to KD-Tree indexes; example using Query-by-example
Trigram Introduction to Trigram indexes for text searches
Hash and Autoid Introduction to Hash, Autoid indexes and unique Object Id searches
List Introduction to List indexes

 

Cursors

An eXtremeDB cursor represents a position in a set of results from a search operation involving an index. The cursor is essentially an iterator over the collection of objects in the result set. While C# and Java applications instantiate Cursor objects directly, in C and C++ applications, the cursor is created by a generated function.

Case Sensitivity and Null Strings

When sorting ASCII strings the alphabetic order of strings is by default case-sensitive. Please refer to the Case Sensitivity page for details on changing this default behavior.

When an index contains null or "empty" strings, the null string will always be sorted "less than" a non-null string; i.e. a key having a null string value will have less value than any other string during compare operations. When comparing two keys with null strings, their values will be equal and other keys (if this is a compound index) will determine the sort order; if not a compound index, the resulting order will be based on the base memory address of the database objects.

Native language Index and Cursor APIs

The APIs and structures for managing indexes and cursors are specific to the programming language used. Please use the links below to view detailed explanations and examples for your development environment:

C Index and cursor management in C
C++ Index and cursor management in C++
Java Index and cursor management in Java
Python Index and cursor management in Python
C# Index and cursor management in C#