SQL vs. API

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Jan 20 18:33:58 CST 2006


On 1/20/06 4:50 PM, "Philip Mötteli" <philip.moetteli at econophone.ch> wrote:

Hi Philip,
 
>>>> In any case I'd recommend at first do not think about Server.
>>>> And implement local variant only. Changes to Vserver are small and
>>>> can be
>>>> added later.
>>> 
>>> I'm afraid, that assuming only the embedded case, might influence my
>>> design considerably. And changing an OO design is very annoying. So I
>>> try to think of both, though I might implement only one version at
>>> first.
>> 
>> First of all let's clarify.
>> 
>> Are you going to use SQL or
>>     API methods only and never SQL?
> 
> I think I have to offer the SQL version, though the pure persistence
> mechanism wouldn't need it.

Okay.

> But as I pointed out in one of our previous letters, searching for
> contents of objects happens and then a declarative approach is often
> used, even in pure dynamical environments (just look at NSPredicate,
> Š). In such a case, using the advantage of an SQL data-store would be
> a great advantage.

Agree.

> More concretely: Imagine a program, managing the cars of a city. All
> these cars would be in a huge instance of NSArray. This collection
> object actually offers a method like this:
> 
> - (NSArray *)filteredArrayUsingPredicate:(NSPredicate *)predicate;

I see 
 
> If this instance of NSAarray, with all the cars of a city is big, it
> would be a big advantage to let this collection object just forward
> all queries to an external data-store like Valentina. This way, the
> memory footprint would be tiny. Only objects, that are really needed,
> would be in memory.

Yes, clear.

> This way the advantage of having an RDB comes into play.

Right.

Point is: IF to think only about LOCAL dbs, then we could solve that
predicates using I_Field::Find() methods. Just I want make sure that you
have learn this way and aware of it. It is FASTEST way.

But taking into account remote access and SQL standard, may be really let's
start with SQL. This will be much easier


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list