Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> modeling / null-values in composite pk?
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
![]() |
![]() |