Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: modeling / null-values in composite pk?
Hi there,
Have thought of using dummy value for the implieskey to walk around this problem ? not sure if you want to use '-' to represent a null for implieskey. This is a typical problem for relational database.
Ken
Jan-Erik Rosinowski wrote in message <38894359.12701233_at_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 - 21:45:39 CST
![]() |
![]() |