Index Concepts

Indexes are used to create alternate ways of organizing the data in your tables. They do not store data. For example, your customer physical table may be keyed or indexed by customer number but you need to be able to look up data by customer name. You could create a index which would put the customer table data in order by name. If you delete this index, the data is not deleted. The data is stored in the physical table.

Index definitions are created as part of the table definition process; i.e. a physical table must be defined before an index can be created over it.  You create indexes by working with table definitions; however, with indexes you must work within a selected physical table definition. A single physical table may have many indexes of the data it contains.

Index definitions in LANSA include a table name and key columns. (Access path maintenance options are also specified for IBM i databases).  In addition, indexes may have select and omit criteria specified which are used to control which records will be included in the index. 

It is important to understand the basic concepts of databases and table definitions before beginning to work with LANSA.  For more information, refer to the IBM Programming Database Guide or other appropriate database guides.

Remember, indexes are part of a LANSA table definition and are not separate objects in the Repository. To create or edit an index, you must select and open the physical table that it is based upon.

Also See

Examples of Indexes

Index Considerations