RecID again
Robert Brenstein
rjb at robelko.com
Wed Feb 16 12:20:38 CST 2005
>Hello Ruslan,
>
>When deleting records in a database, the positions of remaining records
>are not corresponding to their recID.
>So, one can't rely on recID to search records.
>Is there a way to rebuild table with new recIDs after deletions ?
>Or a way to use position number in a sql query ?
>
>Thanks,
>
>Roger;
>
You can physically compact your database records by dumping them into
xml file and then re-creating the database from that file.
When you delete records, Valentina just makes those records available
for re-use. This means the recids of remaining records do not change
although their position (relative) does. When you add new records,
the free records will be re-used, so the physical order of records
will not correspond to the order of entries. This contributes a lot
to Valentina's speed.
Having recids fixed for life for a given record can be advantagous in
some applications; for example, they can be used as unique
identifier. That is,however, a minus for people who want to rely on
physical order of records. In general, it is not a good idea to rely
on that. If you need sequencing, you just need to have your own field
to handle that.
Robert
More information about the Valentina
mailing list