Re: Table structure for "tagging" field values

From: Vincent A Ventrone <vv_at_mbunix.mitre.org>
Date: 1995/03/29
Message-ID: <3lbvro$mo8_at_linus.mitre.org>#1/1


>I have to set up a database where there is the requirement to "tag"
>field instances with at least a data entry source and timestamp (and
>probably some other data). I terms of a typical relational table structure,
>I have to tag data at the field level, not the record level.

I've only given this a little thought, but I can make a suggestion: instead of adding multiple "tag" fields for each field that needs to be tagged (I think you gave the ex. of NAME_SOURCE & NAME_TIME_STAMP for NAME), how about simply pairing each tagged field with a *single* field that will store a foreign key to a row in another table, say TAG_TABLE, that will store the tag fields (SOURCE, TIME_STAMP, etc.) That would simplify the structure of the main table, and provide much greater flexibility--e.g., you could add columns to the TAG_TABLE with no effect on the table whose rows are being tagged. Granted, queries that include the "tag" fields will require a JOIN, but I am supposing that these queries will not be the common ones.

Hope this helps...

-- 
   Vince Ventrone
   The MITRE Corporation       "...In my opinion, there's nothing
   Bedford, MA 01730           in this world beats a '52 Vincent
   vav_at_mitre.org               and a redheaded girl."  -- Richard Thompson
Received on Wed Mar 29 1995 - 00:00:00 CEST

Original text of this message