Key Fields

For the space definition to be valid, at least one of the defined fields must to be used as a key field.

In the Java API, you can specify a set of fields to be used as key fields can be specified by using the SpaceDef's setKey method and passing it a number of strings containing the space names.

In the C API, you can call the tibasKeyDefCreate() function to specify a single string containing a comma-separated list of field names to use as a key.

It is also possible to get a list of the name of the fields marked as key fields in a SpaceDef. In Java, by using the SpaceDef's getKey method. And in C, by using the tibasKeyDefGetFieldNames() function.

Note: If all key fields are marked as nullable it then becomes possible to store a single tuple with no key field values in the Space.