Collection Object
    Philip Mötteli 
    philip.moetteli at econophone.ch
       
    Mon Jul 31 16:58:32 CDT 2006
    
    
  
Am 31.07.2006 um 16:30 schrieb Ruslan Zasukhin:
> On 7/31/06 4:37 PM, "Philip Mötteli"  
> <philip.moetteli at econophone.ch> wrote:
>
>     add into Valentina feature
>             column ARRAY of type T
>             where T can be any (?) Valentina type...
I'd say so.
>> That would be very great, because then, we could leverage the beauty
>> of Valentinas relational part.
>
> What searches you want to do?
>     on Table TC ?
>     on elements of Array?
On both.
> Can you make more details on this?
As we found out, the normal use of a DBMS from an OO-program consists  
of referencing records/objects. For this application an OODBMS is  
much better suited. But NSArray/NSMutableArray also offers these  
methods:
- (NSArray *)filteredArrayUsingPredicate:(NSPredicate *)predicate
- (void)filterUsingPredicate:(NSPredicate *)predicate
These methods actually access the internals/IVars/fields of the  
member objects/records.
We could achieve a huge performance acceleration, if, instead of  
deserializing all the member objects/records into RAM and applying  
the predicate/query there, we let do this on the DBMS side.
So the NSPredicate would produce some SQL output, which would be sent  
to the server, which would apply an SQL statement like this to the  
collection table (NSSet,…)(I'm not an SQL expert!):
SELECT *
FROM NSSet
WHERE a.x = y;
And we would deserialize only the resulting OIDs.
Re
Phil
    
    
More information about the Valentina
mailing list