• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Using Access Indexes

Database managers use indexes to relate the values of key fields to the location of the data entity on the disk. The basic purpose of an index is to speed up access to specific rows or groups of rows within a database table. You also use indexes to enforce the uniqueness of primary keys and establish upper and lower limits for queries. Using an index eliminates the necessity of re-sorting the table each time you need to create a sequenced list based on a foreign key.

Different PC database managers create and use indexes in a variety of ways. Paradox uses a mandatory primary index (.px) to speed up queries and ensure nonduplicate keys. Secondary indexes on nonprimary-key fields are permitted by Paradox (.x## and .y##) and created either by the QuerySpeedUp menu choice or the PAL INDEX instruction. dBASE and some of its xBase dialects allow any number of indexes to be created in the form of individual .ndx files, for a single file or table. The number of xBase indexes that you can have open at once, so as to keep them current, is determined by the xBase RDBMS you choose. In xBase and FoxPro, you select the index you want to use with the SET ORDER TO IndexFileName instruction. Several xBase languages have their own index structures, such as Clipper's .ntx and FoxPro's .idx. dBASE IV+ and FoxPro go one step beyond with their multiple index structures (.mdx and .cdx, respectively) that combine several indexes in a single file. You specify a TAG name to identify which index is to be used to find the records you want.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint