When is it desireable to have the primary key of a table contain more than
one index? Can someone give me examples when it is required, and when it
would not be a good thing to do? What is the purpose of multiple index key?
We might have a slight disconnect re: terminology.
A table (can have) a (single) primary key. A primary key is indexed, with
no duplicates allowed.
Indexing is a technique that makes it easier to find something. In a text
book, an index helps you find where a word or phrase is located faster than
reading each word. In Access, an index helps Access find rows faster.
An index does not have to have "no duplicates" -- duplicates can be allowed
(but not for a primary key).
An index can consist of more than one field in the table. You can have more
than one index on a table.
One example of a table with a primary key and multiple indexes might be an
Address table. I typically build a tblAddress with an Autonumber Primary
Key, a unique, arbitrary (i.e., non-meaningful) long number. I might index
the City field, to make Access run faster when I'm looking for addresses in
a particular City. I might also index the StateProvince field, to make it
faster to find addresses in a particular State. If my address table also
has a field that holds the initials/name of the person who entered the
address, I might index that, too, as a way of more quickly finding all the
addresses I entered.
Good luck
Jeff Boyce
<Access MVP>
~~~~~~~~~~~~~
Make a Great Day
TomG
"Jim Strenk" <jims...@mindspring.com> wrote in message
news:KiSU8.40$pI1...@newstest450b.news.pas.earthlink.net...