home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best Objectech Shareware Selections
/
UNTITLED.iso
/
boss
/
data
/
dbas
/
002
/
readme2.doc
< prev
next >
Wrap
Text File
|
1990-08-11
|
3KB
|
71 lines
This example demonstrates the power of WAMPUM's new multi-
relational data base approach.
To start the application, do the following:
1. Add \WAMPUM to your DOS PATH by typing: PATH=\WAMPUM
2. Set up the CLIPPER environment by typing: SET CLIPPER=V010
3. Change to the sample application directory: CD \WAMPUM\SAMPLE2
4. Run the WAMPUM program by typing: WAMPUM VOODOO
Then choose W - WAMPUM Preformat and mark the sample report option as Y.
Then <PgDn> twice.
The files used include the following:
╔════════════════════════╗
║ PARENT ║
╟────────────────────────╢
║ Lastname C 15 ║
║ Acctno C 10 ║
║ Zip C 5 ║
╚════════════════════════╝
╔═════════════════╗ ╔═════════════════╗ ╔═══════════════╗
║ CHILD ║ ║ ACCOUNTS ║ ║ LOCATION ║
╟─────────────────╢ ╟─────────────────╢ ╟───────────────╢
║Lastname C 15 ║ ║Acctno C 10║ ║Zip C 5 ║
║Child C 15 ║ ║Balance N 10║ ║City C 15║
║ ║ ║Descrip C 20║ ║State C 2 ║
╚═════════════════╝ ╚═════════════════╝ ╚═══════════════╝
For the sample report, we have linked the three secondary data
bases to the PARENT data base. This required that an index file
be created for each secondary data base which MATCHED a field in
the primary data base. For CHILD, there is a LASTNAME index. For
ACCOUNTS, there is an ACCTNO index. And for LOCATION, there is a
ZIP index. NOTE: The fields in the PRIMARY and SECONDARY data
base MUST be of the (1) same type, (2) same length, and (3) same
field name. And the index field name must be the same as the
actual field name to which it refers.
When the report is run by selecting W - WAMPUM PreFormat and
marking the sample report T or Y, the report writer will
automatically link to all the data bases and extract the following
fields:
LASTNAME from the PARENT data base
CHILD from the CHILD data base (based on LASTNAME link)
BALANCE from the ACCOUNTS data base (based on ACCTNO link)
CITY and STATE from LOCATION data base (based on ZIP link)
Please note: this is simply an example to show the functionality
of relational data bases. It was not intended to do meaningful
work! In the dBASE world, relational (secondary) data bases MUSTbear a one-to-one relationship to the primary data base! There-
fore, in this example, if a PARENT had two or more children, the
remaining children would NOT be extracted on the report. Hence it
is important to set up your files correctly. If the purpose of
your system were to track multiple children (who do NOT have
multiple sets of parents, i.e. pre-nuclear), then the PRIMARY
data base should be the CHILD data base. This would mean the
ACCTNO and ZIP fields would have to be added to the CHILD data
base rather than the PARENT file as was the case here.
Use F -FILE SELECT and choose the WAMPUM.DBF file. Then display
record 1 which demonstrates how the actual relationships were
established for this example.