Re: Normalization and Derived Information

From: Kenneth Downs <firstinit.lastname_at_lastnameplusfam.net>
Date: Fri, 24 Sep 2004 11:50:58 -0400
Message-ID: <2pf1jc.cgg.ln_at_mercury.downsfam.net>


Laconic2 wrote:

>
> "Kenneth Downs" <firstinit.lastname_at_lastnameplusfam.net> wrote in message
> news:0a21jc.9df.ln_at_mercury.downsfam.net...
>

>> Since a view generator is a special case of a SELECT generator, my

> thinking
>> runs towards using materialized derived columns in tables, so that the
>> selects are always pulling simple columns and never calculating on the

> fly.
>
> Yup, a SELECT generator. Cool!
>
> Another question is WHEN to do the materializing: at store time, at
> retrieval time, or some time in between.
>
> The same question occurs in compilers. There are some compilers that are
> smart enough (or dumb enough) to
> evaluate sqrt(2) at compile time, and merely store the result in the
> object program, much as if it had been a literal in the source.

My current thinking, which I am implementing in my current project, is to materialize in the INSERT and UPDATE triggers. This is not to say there are not other ways, but in this way the definitions are satisfied within the transaction. There will be howls of protest about performance, but methinks the CPU time on the server to generate the value is less than the wire time to send it over from another tier (I could be wrong).

-- 
Kenneth Downs
Use first initial plus last name at last name plus literal "fam.net" to
email me
Received on Fri Sep 24 2004 - 17:50:58 CEST

Original text of this message