Cari Blog Ini

27 Juni 2012

Index Keys in Database

An index key designates the column or columns that are used to generate the index.
The index key is the value that enables you to quickly find the row
that contains the data you are interested in,
much like an index entry in a book points you to a particular topic in the text.
To access the data row by using the index,
you must include the index key value or values in the WHERE clause of the SQL statement.
How this is accomplished depends on whether the index is a simple index or a composite index.

A. Simple Indexes
A simple index is an index that is defined on only one table column,
as illustrated in Figure 17-4.
This column must be referenced in the WHERE clause of the SQL statement
in order for this index to be used to satisfy the statement.







B. Composite Indexes
A composite index is an index defined on more than one column,
as illustrated in Figure 17-5.
A composite index can be accessed by using one or more index keys.

Source:
Microsoft SQL Server 2000 Administrator's Companion eBook