Individual Type Code tables vs. one big one
Date: 1996/11/15
Message-ID: <56id57$fpq2_at_dilbert.whoi.edu>#1/1
I've developed an application, rather large, with a mix of the two.
One generic table with (code, type, definition) and one strict control table with one column for each coded value. A constraint requires that only one column contain a value. Each column has a unique key. This is used only for codes that referenced by 'active' tables, that is tables that are updated by the general user or tables that we want a reasonably fast response on. A trigger prevents updating the control table directly. A trigger in the generic table will update the control table if type is one of the control table's columns. For tables that are not very active, a trigger can control inserts and updates by looking up in the generic table. To do all of this, the triggers must call stored procedures.
Works like a charm.
Julien Goulet
jgoulet_at_mola.gso.uri.edu
Received on Fri Nov 15 1996 - 00:00:00 CET
