I'm working on an app that has at its core one database that could have potentially 2 keys. One is a record ID that is generated when the record is created and never changes after that. The other is the item's name, which can potentially change. At different points in the app, I could look up a record based on either of those bits of data.
What I'm facing is really an efficiency question. Is a re-sort (using DmQuickSort, probably) for lookups by each key prohibitive enough to go through the overhead of maintaining a separate index database, sorted by the other of the two keys, which will need to be updated whenever the main database is updated. The re-sorts will only be needed when a lookup is needed with the non-editable key, which will be relatively infrequently. I could use the unique ID for this, but I'd be referencing it from within other records (there will be links between records here). Unless I've been misinformed all this time, the unique ID is not guaranteed to never change, is it? I'm talking about between HotSyncs, etc., especially when you're restoring a backup copy. ----------------------------------------------------------------------- Brian Smith // avalon73 at arthurian dot nu // http://www.arthurian.nu/ Software Developer // Gamer // Webmaster // System Administrator "I always wanted to be somebody, but I should have been more specific." -- Lily Tomlin -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
