Hi All,

I have an app where I need a number of indices for a DB. I am planning to 
use separate DBs to store the indices. However I have not decided how the 
index records shall point to the actual records. I can think of 4 options.

1. I assign my own IDs to the records. Keep the DB sorted on these Ids. 
Store the ID in the index record and use binary search to find the actual 
record in the main DB. This needs an extra field and an extra search after I 
have found the index in the index DB.

2. Use the Palm record index. This will make accesing the actual record 
quite fast, just a DmQueryRecord Call. But, I have to keep on updating all 
the records in all the index DBs, every time I insert or delete a record.

3. Use the unique ID of the record. This gets rid of the update problem. 
But, I suspect finding a record by unique ID shall take time. My guess is 
DmFindRecordByID does a linear search of the DB header.

4. Use the local ID of the records. This should give fast access to the 
actual record. All I have to do is to convert the local ID to locked 
pointer. Probably it will get rid of the updating problem. But, I am not 
sure. How safe it is to store the local IDs?

Any other ways of storing a record pointer?

Thanks for your patience.

-Sugho-

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

Reply via email to