Defining a table  General information and rules

Chapter 1: Overview

Defining the Key field

The Key field is a piece of an incoming transaction’s data that is unique to all transactions that transaction production should collect together for an endpoint. You may define a field object or a datalink object for this data area. For example, if the relevant transactions gathered from the lab, pharmacy, and admitting applications all contained the patient ID “123456789” in the data, the production objects that gather and process these transactions would define a field object or datalink object for the “123456789” segment of data. This field object or datalink object becomes the key for those transactions.

For the dbInsert, dbDiskList, dbSelect, and dbDelete built-in filter functions, in the Filter Information window, place either the field object’s name into the Key field argument field or the datalink object’s name into the Key DataLink argument field. If you place an entry in both the Key field and DataLink argument fields, TRAN-IDE always uses the value in the field object as the key unless the field object is empty or missing in the transaction. When using the dbDiskList Builtin Filter Function, you can also supply a literal search mask in the “Key Lit” field, using wild cards if necessary. This field is used only if the “Key Field” and “Key DataLink” fields are empty. For the dbExist and dbNotExist Built-in Qualification functions, select the FldObj option in the Qualification Object Information Window and place this field object’s name into the entry field.

When necessary, transaction production truncates and maps the Key’s name following the conventions listed in “Defining a table”.

The dbDiskList also requires a separator, which is placed between the results of the search. That separator is user-provided, and can be entered in the Sep Lit field. The default is a colon (:).

NoteThe key must be unique enough that it truncates and maps to a unique name. If two transactions for the same table have different keys that map to the same name, then transaction production writes the second transaction's data over the first's in the collection file.





Copyright © 2005. Sybase Inc. All rights reserved. General information and rules

View this book as PDF