

Designing the Data Structure › Using the Data Structure List › Data Structure List Terminology › Indexes
Indexes
In the data structure, an index describes an arrangement of columns used as an index into a table.
Indexes are used to:
- Ensure uniqueness of entities represented in the database—When an index is specified as being unique, it allows no two records in the same table to have the same index value. For example, consider the entity type CUSTOMER with an identifying attribute, Number. When customer is implemented as a table in the Data Structure List, it is given a unique index of Number. When the database is subsequently generated and installed, no two customers are allowed to have the same Number.
- Enhance performance of the generated database—The use of indexes to improve performance depends on the access characteristics of the procedures that use the data.
Imagine that the CUSTOMER entity type has a non-identifying attribute called Name, and that no index is defined for Name. Thus, for a procedure that lists customers in alphabetical order by Name, at execution time the DBMS would have to execute these steps:
- Look at all of the CUSTOMER records
- Sort them into Name sequence
- Present the list to the procedure
When an index is defined for Name, the DBMS automatically keeps track of customers in Name sequence, eliminating the need for sorting the records. CA Gen automatically creates an index for each identifier during transformation. In addition, it creates an index for foreign keys implementing relationships.
Each index is associated with exactly one record in a table and may have the properties shown in the following table.
Copyright © 2013 CA.
All rights reserved.
 
|
|