Navigation:  NexusDB Guide > Management Tools > The Enterprise Manager > Creating and Restructuring Tables > Table Structure Window >

Index Descriptors

Previous pageReturn to chapter overviewNext page

NexusDB V3 Manual

Index Descriptors

button_main button_prev button_next

NexusDB Manual V3 > Management Tools > The Enterprise Manager > Creating and Restructuring Tables > Table Structure Window

 

The index descriptors section is where maintenance of the indices is performed.

 

clip0167

 

The Indices tab allows you to set and define indices for your table from the fields entered.  The index header information is entered into the top grid on this tab.  The fields for each index are entered in the middle grid.  Note that you must enter at least one field for each index as you proceed.  (That is, you can not simply enter all the indices and then come back and add the fields for each index as a 'second pass'.) The lower grid displays the locale descriptor for each individual field.

 

Index Header

 

Each index must be given a name (again, refer to to the Regular Identifiers section for compliance) as a minimum entry in the top grid.

 

Duplicates: If all values are allowed to appear multiple times, set the column value to idAll. If non-null values should be unique, and multiple NULL values are allowed, set the column value to idNull (the default for SQL created indexes). If all keys in this index should be unique, then set this column to idNone.

 

Check the Default column on the index you wish to be the primary index.

 

To save the index in a secondary physical file on disk, select it from the drop down (it has to be defined in the File Descriptors part first). The default selection the main table file.

 

The Description column is a optional place for you to enter whatever text you would normally like to put comments related to each index.  This is a virtually size-unlimited field.

 

Key Length is an information column; it shows the number of bytes taken up by one index key.

 

Constraint name is an auto-generated value, created by the SQL engine when creating constraints.

 

Filter Type denotes the type of index filter descriptor connected to the index. Currently supported are simple expression (as used in TnxTable.Filter) and Sql (like an sql where clause). If used, the index will only index rows where the filter returns True.

 

Filter Text contains the simple expression or Sql statement; see rows 5 and 6 in the image above.

 

 

Index Fields

 

The fields in each index contain the following values:

 

A valid (existing) field name must be entered.  This is selectable from a dropdown list.

 

NexusDB allows you to set a field based sort order.  The default is Ascending, but you are not restricted to having all fields in an index as either ascending or descending.

 

The Guid Sort checkbox is only active for Guid fields; if checked, the field is sorted on the byte value; if unchecked, like a string.

 

Check the Case Insensitivity field if you don't want case sensitivity in your sorting.

 

The Override Length Char and Override Length Byte allows for partial indexing of fields; eg you could have a 4000 character string field and only index on the first 100 characters.

 

Null Behaviour defines null value sorting or filtering.

 

nbTop                       sorts NULL before any other values

nbBottom               sorts NULL after any other values

nbAsAscend               NULL is smaller if sort is ascending, otherwise larger

nbAsDescend               NULL is larger if sort is ascending, otherwise smaller

nbFilterNull                filters out NULL values from the index

nbFilterNonNull       filters out non-NULL values from the index (stores only NULLs)

 

 

Locale Descriptor

 

Each field in an index can have a locale descriptor attached. If it does, then for this field it overrides the setting in the field descriptor and global locale descriptor. For specific information on the locale descriptor options please see the windows SDK help on CompareString.

 

© Nexus Database Systems Pty Ltd.

nexus_logo