How to access child objects in hierarchical database setup

Arthur Clemens aclemens at xs4all.nl
Sun Nov 2 18:24:32 CST 2003


On Sunday, November 2, 2003, at 04:36 PM, Ruslan Zasukhin wrote:

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

Correct

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

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

Yes.

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

If I want to sort the set, can I use a bitset too?

Arthur



More information about the Valentina mailing list