database structure & speed

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Dec 3 22:08:17 CST 2004


On 12/3/04 11:37 AM, "End If Software - Ralf Sander" <ralf at end-if.de> wrote:

Hi Ralf,

>>>> 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.

Aha, you store name of custom fields in other tables...

Well, then right, use names.

> If I store the  names of new fields in a new table, it would be easier to
> handle. 

yes

> Wouldn't it make more sense to get the indecies on opening the database?

>From name to get indices?
Yes this can work

> 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 :-)

In Valentina 2.0 we have ID for fields and tables.

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------




More information about the Valentina mailing list