SQL Select with Binary Link

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Jun 15 00:54:33 CDT 2008


On 6/14/08 11:11 PM, "william humphrey" <shoreagent at gmail.com> wrote:

Hi William,

> Thanks as always and your examples help me realize that working with the
> Valentina forign key stuff is not that much different.

Of course.

Foreign keys are FOREIGN KEYS. This is standard feature of Relational DBMS.
Valentina is Object-Relational, so  it supports FK.

----------
> One more question. If you are filling out a card with data from different
> tables all at one and as you can see some of the returns are multiple line
> (several phone numbers for one customer) and some go into check boxes and
> some fill out the choices for pop-up buttons etc.
> 
> Is it best
> 
> 1. Make a big SQL that returns everything you need, load it in variables and
> then fill everything with those variables.

If you work with REMOTE server, then better issue less SQL commands.
Will be faster network communication.

> 2. Make many separate SQL calls and fill out different things accordingly.

If really MANY then this may slow down even on local case.

If MANY queries of the same kind then it is good idea to use BINDING.

         "SELECT * FROM T WHERE ptr = :1"

Binding helps to engine cache such query in the pool,
You can win about 20 times faster.

--- 
> I was thinking choice two might be better because some of the the pop-ups
> etc are used in the "edit and make new entry" card while they are
> unnecessary in the view data card. But then it is lots more calls and code
> writing and maybe slower.
> 
> I was also thinking choice 1. is better because then you could get a card
> that would behave more like the original hypercard stack that was not
> normalized stored data.
> 
> Your thoughts?

Main points from DBMS point of vew given above.

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