|
|
|||||
Introducing PTWin32 |
Making
a data model for a report you are writing is simple if the tables you want to
use are related only to each other. For example, linking the permit ADMIN
table to its associated records in the PERMINFO table requires only that you
link the Permit Key field that is common to both tables. However,
many of the dependent secondary tables in PTWin32 work with multiple PTWin32
modules. For example, records for things like Conditions, Violations,
Graphics, Fees, and Inspections can be associated with a Permit,
but they can also be associated with a Code Enforcement action. When
the records in a table can be attached to more than one source we add a field
called Reference Type to keep track of the source. The
Reference Key field stores the source table’s key value. Since in this
example, the Reference Key can store both Permit Key and Code
Enforcement Key values the names of the fields to link cannot be the same. So
for example, to link the PERMINFO table to its associated records in the FEES
table you would link the Reference Type in the PERMINFO table to the Reference
Type in the FEES table, then you would link the Permit Key in the
PERMINFO table to the Reference Key in the FEES table.
|
||||