You can add non-unique indices to entities. You add indices to a standard database table, by adding an Index element in the extension XML for that table.
About this task
To
add non-unique indices to a standard table:
Procedure
- Copy the install_dir/installed_data/repository/entity/extensions/Extensions.xml.sample
file as install_dir/extensions/global/entities/your_filename.xml
file OR modify your existing extension XML file.
- Edit the your_filename.xml file to add
non-unique indices as shown in the following example for each table
you want to extend. For a description of the XML attributes, see the
table that follows the example.
<!-- element exposed to create index -->
<DBSchema>
<Entities>
<Entity TableName="REQUIRED">
.
.
<Indices>
<Index Name="REQUIRED" AllowCompressedColumns="false">
<Column Name="REQUIRED" />
.
.
</Index>
.
.
</Indices>
.
.
</Entity>
</Entities>
</DBSchema>
Attribute
|
Description
|
Entity
|
TableName
|
Required. Name of the table for which the indices
are added, For example: YFS_ITEM.
|
Entity/Index
|
Name
|
Required. The name of the custom index. Name
should start with a prefix EXTN_
|
AllowCompressedColumns
|
Optional. If True, the
index is allowed to contain columns marked with CompressionSupported
attribute set to True.
|
Entity/Index/Column
|
Name
|
Required. The name of the column for which the
index is added. Create a new Column Name for each column for which
the index is added.
|
- Create a new Index tag for each index you want to add to
the column.
- Extend the corresponding API templates to include the non-unique
indices by following the instructions in Extending API Templates.
- Build and deploy your extensions.