sql command help
Ruslan Zasukhin
sunshine at public.kherson.ua
Sun Oct 21 10:06:39 CDT 2007
On 21/10/07 5:43 PM, "Trausti Thor Johannsson" <tj at quarksbar.net> wrote:
Hi Trausti,
> Hello great list,
>
> Here is my table (sort of)
>
> id int
> name string
> father int
> mother int
>
>
> Father and mother connect to an id. simple.
>
> So, I have an sql command to find children
>
>
> select * from person where ( (father=23) or (mother=23) )
OR ?
You don't know if Person 23 is man or female?
Ok, may be this is juts sample ...
> I have seen all kinds of strange looking valentina sql, so I was
> wondering if there was a simpler (quicker) way to do this ? Or
> perhaps a totally different way ?
Simper no. Faster yes.
1) ObjectPtr will be faster of INT If you need some big joins
but not only single record navigation
2) you can use BinaryLinks also ...
But your above example is very simple. Most probably your app will have
other kinds of queries also.
--
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