biology daily - the biology and biochemistry encyclopedia
biology daily articles and research Encyclopedia Dictionary Forums biology research links Weblinks Pictures Articles Blogs Newsletter

Index (database)

This is a special case of Index that relates to Relational database management system (RDBMS) tables.

An index is defined on one or more columns is a table (these columns are referred to as the indexed columns). The index maps each set of indexed column values to the set of unique identifiers for the rows that have those column values. This structure provides a quick way to find the rows within a table using the indexed column(s).

Uniqueness

Indexes can be defined as unique or non-unique. A unique index does not allow any combination of column values to map to more than one row.

Column order

The order that columns are listed in the index definition is important. It is possible to retrieve a set of row identifiers using the only the first indexed columns. However, it is not possible or efficient (on most RDBMSs) to retrieve the set of row identifiers using the only the second or greater indexed column.

For example, imagine a phone book that is organized by city first, then by last name, and then by first name. If given the city, you can easily extract the list of all phone numbers for that city. However, in this phone book it would be very tedious to find all the phone numbers for a given last name. You would have to look within each cities section for the entries with that last name. Some databases can do this, others just won’t use the index.



07-14-2008 23:18:10
The contents of this article are licensed from Wikipedia.org under the GNU Free Documentation License. How to see transparent copy
BiologyDaily.com 2005. Legal info   Privacy