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

Home -> Community -> Usenet -> c.d.o.server -> modeling / null-values in composite pk?

modeling / null-values in composite pk?

From: Jan-Erik Rosinowski <spamfilter_at_rosinowski.de>
Date: Fri, 21 Jan 2000 11:51:57 GMT
Message-ID: <38894359.12701233@News.CIS.DFN.DE>

we've got a table with 4 attributes:

create table lookup (
key varchar2(50) not null
value varchar2(50) not null
implieskey varchar2(50) null
impliesvalue varchar2(50) null);

which is used to model lookuplists (key,value) and - if appropriate, used to enforce the setting of other fields (implieskey,impliesvalue).

primary key is (key,value) but it would make sense to include the "implieskey" attribute to allow multiple implications of a single lookup-value. how can we handle this? implieskey must be nullable or reference another table (fk). we use ora 7.3.4

any ideas?

splitting the table into two tables (key,value) and (key,value,impliedkey not null,impliedvalue) with the latter using the pk as desired above seems to be logically correct but somewhat braindead

any help greatly appreciated

ciao, jan

http://www.rsp.de - Software zur effizienten Erstellung und Verwaltung von Gutachten, Analysen, Pruefprotokollen etc. Received on Fri Jan 21 2000 - 05:51:57 CST

Original text of this message

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