gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Re: Gnumed-devel Digest, Vol 6, Issue 34


From: Horst Herb
Subject: Re: [Gnumed-devel] Re: Gnumed-devel Digest, Vol 6, Issue 34
Date: Fri, 23 May 2003 22:46:05 +1000
User-agent: KMail/1.5

On Fri, 23 May 2003 21:58, sjtan wrote:
> What about starting with a dead simple mapping , then later normalizing
> it by making the simple tables views with triggers?

Sounds like an excellent idea.

In some cases I'd even go for the following approach for performance (and sort 
of simplicity) reasons:
where normalized data is small (example: typical enumerations) we should store 
BOTH data and foreign key to data in the table. A trigger will intercept 
inserts and updates and make sure that referential integrity is maintained by 
using the referenced table as "lookup" only.

Speeds up and simplifies read queries tremendously, is modest in terms of 
database bloat, and still preserves the advantages of normalization.
The storage of the FK is neccessary to facilitate house keeping scripts for 
later updates, since apparently identical referenced data can belong to 
different foreign keys.

Makes all the difference in cases like a standard address where the data is 
almost always read en bloc anyway.

Horst




reply via email to

[Prev in Thread] Current Thread [Next in Thread]