### Constraints and Indexes

This interface allows the creation of special kinds of attributes called constraints. The constraints are specific types of attributes that can be defined by one or more attributes of a data set. Usually it is used to uniquely identify an entry in a table. These constraints can also be used as indexes.

There are three different types of constraints:

- Primary Key: uniquely identify an entry in a table, null values are not alloed and each table can have only one primary key.

- Unique Key: uniquely identify an entry in a table, null values are allowed and each table can have multiple unique keys.

- Index: used to optimize the searching of the data. The attributes used to index the data will vary depending on the type of index to be created. Supported types of index are:

- Btree index type,

- RTree index type,

- QuadTree index type,

- Hash index type.

Creating Primary or unique keys

1. Type - Select the type to be created (primary key or unique key).
2. Name - Define the constraint name.
3. Available Properties x Selected Properties - Select from available properties list which ones will compose the constraint and click on icon arrow to transfer them to the selected properties list. Use the arrows to move from one list to the other as necessary.
4. Press Ok to create the constraint or Cancel to close the dialog.

Creating Indexes

1. Type - Select the constraint type as Index.
2. Name - Define the index name.
3. Type - Select the index type (BTree, RTree, QuadTree, Hash).
4. Available Properties x Selected Properties - Select from available properties list which ones will compose the index and use the arrow icon to transfer them to the selected properties list. Use the arrows to move from one list to the other as necessary.
5. Press Ok to create the constraint or Cancel to close the dialog.