Chapter 1-3: Data Dictionary Cover Page 1-03:Indexed File Organization1-03:Default Value Records

File Keys


For each indexed file, you specify a primary key and up to 16 alternate keys. A primary key is required for each file, while alternate keys are optional.

A primary key provides the default key path by which to access and retrieve specific records in an indexed file. Unless otherwise specified by a user or designer, the primary key path is always used. The field you designate as the primary key should generally be short and must be unique. A primary key is often used as a link to data in other files. Examples of primary keys include a customer number in a customer file, a product code in a product file, and a date/time stamp in a purchases history file.

Alternate keys provide optional key paths by which to access and retrieve specific records in an indexed file. A user or designer may optionally choose to change from the primary key path to any alternate key path for record access and retrieval. Examples of alternate keys to a customer file might include customer name or phone number.

APPX allows you to have duplicate alternate key values in a file, although a unique primary key is required. For each key path, you specify whether duplicate key values are allowed.

When you define a field to be the key to your file, there are two fields in the Key Control pop-up box in addition to Key Type:

·     Key/Field Order can be defined as ASCENDING or DESCENDING. The default is ASCENDING.

·     User Selectable? determines whether or not a user can switch to a key path with the Select Access Path option from within an input process. The default is "yes" iconcheckyes.png.

A field does not have to be designated as a key to be used as a sort field in query processes. During sorting, APPX can use any fields to generate the required sort order.

 

APPX Application Design Manual (01/13/03) Cover Page 1-03:Indexed File Organization1-03:Default Value Records

© 2003 by APPX Software, Inc. All rights reserved