sql command help

Trausti Thor Johannsson tj at quarksbar.net
Sun Oct 21 13:10:42 CDT 2007


No, i do not know if mother / father is male or female, adoptions and  
stuff like that, complicated family pattern :)

It just can take quite some time to draw family trees of like 15  
generations.



Trausti


On Oct 21, 2007, at 5:06 PM, Ruslan Zasukhin wrote:

> 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]
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list