database structure & speed
End If Software - Ralf Sander
ralf at end-if.de
Fri Dec 3 10:37:53 CST 2004
Hi Ruslan,
>>> You should use access by index.
>>> This is quite fast.
>> I thought, I could use a dictionary with all names, that I store in the
>> database. This makes it easy to assign user-customizable content to
>> each field on record creation. (eg. file creation date to field
>> "userfield 12"
<> I can't imagine how access by index would work here?
>Why not simply indexes ?
Ok lets assume, the user creates 50 fields. Then I could store the index and
what content the user wants to have in the field(i) in another table (e.g.
field i=name). But what, if he deletes field 15? The I would have to
reorder everything.
If I store the names of new fields in a new table, it would be easier to
handle.
Wouldn't it make more sense to get the indecies on opening the database?
I could then fill a dictionary with the fieldnames as key and the index as
value. Or will the access to the dictionary values compensate the speed
advantages of getting the field by index instead of getting by name?
Everything could be more easy, it every field would have a unique id :-)
Cheers,
Ralf
More information about the Valentina
mailing list