Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> storing table names

storing table names

From: kev <kevin.porter_at_fast.no>
Date: Fri, 27 Aug 1999 14:10:29 +0100
Message-ID: <37C68E45.48351410@fast.no>


Hi,

I have a table which needs a geographical category associated with it. However, the geog category can refer to either a country _or_ a continent _or_ a football league (eg Premiership, Serie A, etc). There are two ways to do this that I can think of:

  1. have a cont (for continent) field, a coun (for country) field and a leag field, and leave one blank.
  2. have a geog field (to store either the word 'country' or the word 'continent' or the word 'league') and a geogid field to point to the relevant field in the table specified in the geog field.

Bearing I mind I need to do this sort of thing in several other places in the DB, which is generally the better solution? The first approach wastes disk space, but will the second approach cause difficulties when specifying foreign key constraints, etc? Would I need to specify three foreign key constraints on the geogid field? Will Oracle let me do that?

TIA,

Received on Fri Aug 27 1999 - 08:10:29 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US