Choosing an index type

UltraLite supports different types of indexes: unique keys, unique indexes, and non-unique indexes. What differentiates one from the others is what is allowed in that index.

Index characteristic Unique keys Unique indexes Non-unique indexes
Allows duplicate index entries for rows that have the same values in indexed columns. no no yes
Allows null values in index columns. no yes yes
Notes

You can create foreign keys to unique keys, but not to unique indexes.

Also, manually creating an index on a key column is not necessary and generally not recommended. UltraLite creates and maintains indexes for unique keys automatically.

See also