How to access child objects in hierarchical database setup

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Nov 2 17:36:12 CST 2003


on 11/2/03 15:51, Arthur Clemens at aclemens at xs4all.nl wrote:

Hi Arthur,

> I'm find myself still struggling with fundamental Valentina concepts,
> as I am switching from SQL based db to Valentina db. Here I have my
> hierarchical database setup:
> 
> Record (holder of the following children:)
>      SloveneWord (n times possible per Record)
>      RecordSection (n times possible per Record; holder of the
> following children:)
>            Translation (1 each Record Section)
>            Grammar (1 each Record Section)
>            // some other fields

So, Record is table,
        SloveneWord  is table ?
        RecordSection  is table ?


Do you use ObjectPtr to make links ?
E.g. ObjectPtr is located in SloveneWord and points to Record table, yes?


> I am trying to do this without SQL queries, because I have the
> impression these queries will be slower than accessing variables
> directly.
> 
> Now I want to show all SloveneWords (with sort order = 0) in a table
> view. This has to be a very fast lookup.
> 
> So I have a FBL_BitSet with all records (myDatabase->SelectAllRecords();

Hmm, do you mean 

    bitSet* pAll = SomeTable->SelectAllRecords()


> I store them in a FBL_ArraySet with a FBL_ArraySetIterator to access it).

Hmm, if you have select all records, and get them as BitSet then you not
need convert BitSet into arrayset! This just spend time and RAM.

BitSet also have Iterator.


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