Key options

The database type you specified in the Table Definition window indicates which sets of key options you can specify for each key. If the database type for the table is c-tree or Pervasive.SQL, you can specify P.SQL/c-tree key options. If the database type is SQL, you can specify SQL key options. If the database type is Default, you can specify both sets of options.

P.SQL/c-tree key options

The following key options apply when you are using the Pervasive.SQL or c-tree database types.

Duplicates   Specifies whether multiple records in the table can have the same key value. If this option is marked, new records that have the same key values as records already in the table can be saved. If the selection isn’t marked, new records with the same key values as existing records won’t be saved.

Modifiable   If this option is marked, the values of key fields can be modified after a record has been saved. It this selection isn’t marked, and you attempt to change the value of a key segment and resave the record, an error will occur and the record won’t be saved. This selection applies only to the Pervasive.SQL database manager. The c-tree database manager always allows you to modify key segments of records.

Compress   Marking this option allows the database manager to compress information for the key and save space in the index file. Currently, this is supported only by the c-tree database manager.

SQL key options

The following key options apply when the SQL database type is used.

Primary   Marking this option indicates this is the primary key for the table. The primary key must ensure that each record in the table is uniquely identified, so by marking the Primary selection, the Create Index and Unique options are marked automatically. A table can have only one primary key.

Create Index   Marking this option will create an index for the table based upon this key definition. The index contains a copy of the data in the key’s key segments and pointers to the associated records in the table. An index allows data to be retrieved from the table more quickly.

If Create Index is marked, the following options are available:


Documentation Feedback