At 11:34 AM -0400 10/6/99, Gordon, Douglas wrote:
><snip>The main characteristic of the database on the Palm is that it is truly a
>sort of database, with numerous "links" between records required. I assume
>that the only practical way to do this is to use the "unique record ID"
>field to act as a "pointer" to a related record. <snip>
Because your Palm app is a viewer, you can get away with using record numbers for your
"links". This will make following "links" quite efficient. However, this will require
your conduit to re-write entire databases whenever anything changes, since later
records get renumbered when records are inserted or deleted.
If you want your conduit to be as efficient as possible, you should use your own ID
field. Reserve some bytes in each record for a unique ID which you generate. You can
store the last ID generated in the app info block. If possible, sort your databases by
this ID. This will allow you to follow a "link" without having to scan all the
records. (You'll have to work around the off-by-one bug in DmFindSortPosition.)
Whether all this is worth the trouble is questionable in your case since the data
changes infrequently.
I'd probably use record numbers.
-
Danny Epstein, Applied Thought Corporation
Have friends with Palm organizers? Get BeamBooks!
http://www.appliedthought.com/beambooks