RISE to Bloome Software
Log In    
r2bsoftware.se r2bsoftware.se
Click to hide navigation tree

Adding indexes

RISE supports adding indexes to entities. An index is based on a group of attributes and relations available for the entity. There are two types of indexes, unique and non-unique. It's the unique indexes that are meaningful from a modeling point-of-view. Unique indexes are used to create composite constraints, e.g. saying that a document name needs to be unique within a folder. 

Indexes are actually a relational database feature, thus, RISE only supports indexes involving relations that are "implemented by" the indexed entity, i.e. when the relation is transformed into a relational database relation the entity/table needs to implement the foreign key of the index. If you're uncertain as to how RISE interprets a specific relationship just press F11, in a RISE diagram, to toggle to relational database mode.

To create an index simply right-click the entity and select "Add Index" from the popup menu. Existing indexes are shown in the Index tab of bottom-left panel. You may double-click an index to view its details. To delete the index simply select the index in the data grid and press the Delete button.

In the example model above, it's reasonable to add two indexes. One index, on the Document entity, stating that the name must be unique for a given folder and a second index, on the Folder, making sure that the folder name is unique for all folders having the same parent. The image below shows the FolderName index of the Document entity. 

During creation of an index you may press the Add button in the Index dialog. This will present another dialog where you choose the columns (attribute or relations) to index. Once a set of columns has been selected you may reorder it.  That's, for search indexes, reorder the columns to match the query you're optimizing. Note that once an index has been created you can't edit it, instead delete it and create a new one.