Profiles

Non-conditional Profiles

A non-conditional profile over a class is generated as an index on the class’s database table. The DuplicatesAllowed property for a profile specifies whether duplicate keys can be created for the index. Setting this property to True creates an index that is not unique.

If the DuplicatesAllowed property is set to False the UNIQUE clause is used on the creation of the index to ensure the key values for the profile are unique.

Conditional Profiles

Conditional profiles are created as an Index View for an SQL Server Runtime database. These are structures maintained by the DBMS software. The key columns of the conditional profile plus the _Id column are the columns contained in the view. The conditional logic for the profile is used in the view’s WHERE clause.

Two indexes are created on the view, one on the _Id column and the other is the profile s key columns. If the DuplicatesAllowed property of the conditional profile is set to False, then the UNIQUE clause is used on the key column index to ensure the key values for the profile are unique. If the DuplicatesAllowed property is set to True, then the UNIQUE clause is not used, allowing duplicate key values.