Constraints
and Indexes
This
interface allows the creation of special kinds of attributes, which are
the constraints. The constraints are specific types of attributes
that can be defined by a one or more attributes of a data set, usually
serve to uniquely identify an entry in a table. These constraints can
also be used as indexes.
This interface allows the
creation of three different types of attributes.
- Primary Key: uniquely
identify an entry in a table, cannot allow null values and each table
can have at most one primary key.
- Unique Key: uniquely
identify an entry in a table, but can allow null values and each table
can have multiple unique keys.
- Index: used to optimize
the search of the data. The attributes used to form this restriction
will vary depending on the type of index to be created. Supported types
of index are:
The interface for the
creation of primary keys and unique keys are exactly the same. For the
creation of these items the following steps are needed:
- Select the type to be created
(primary key or unique key),
- Define a name for this
constraint,
- Select which attributes
will be part of the constraint to be created.
For the
creation of index, the steps are repeated, but moreover it is necessary
to define the type of index to be used.
- Select the type to be created
(for this case Index),
- Define a name for this
index,
- Select which attributes
will be part of the index to be created,
- Select the type of
index to be used.