Re: [GENERAL] Partial foreign keys, check constraints and inheritance

2005-11-22 Thread Jim C. Nasby
On Thu, Nov 17, 2005 at 02:21:33PM -0500, Eric E wrote: > >maybe you can solve it adding a new col and allow both to contain null > >values. > > > >if these are not mutually exclusive you can avoid a check if they are > >check that if one has a non-null value other has null... > > > I did think

Re: [GENERAL] Partial foreign keys, check constraints and inheritance

2005-11-17 Thread Greg Stark
> On 11/17/05, Eric E <[EMAIL PROTECTED]> wrote: > > > > What's the best way to do this? My immediate reaction is that I want a > > partial foreign key, but perhaps this is not a good way to go about such > > a design. Normally I just have multiple columns with all but one NULL. Alternatively

Re: [GENERAL] Partial foreign keys, check constraints and inheritance

2005-11-17 Thread Eric E
Scott Marlowe wrote: On Thu, 2005-11-17 at 13:36, Eric E wrote: Eric E wrote: maybe you can solve it adding a new col and allow both to contain null values. if these are not mutually exclusive you can avoid a check if they are check that if one has a non-null value other has null...

Re: [GENERAL] Partial foreign keys, check constraints and inheritance

2005-11-17 Thread Eric E
Eric E wrote: maybe you can solve it adding a new col and allow both to contain null values. if these are not mutually exclusive you can avoid a check if they are check that if one has a non-null value other has null... I did think about that, but I disliked the idea of two fields of nulls

Re: [GENERAL] Partial foreign keys, check constraints and inheritance

2005-11-17 Thread Eric E
maybe you can solve it adding a new col and allow both to contain null values. if these are not mutually exclusive you can avoid a check if they are check that if one has a non-null value other has null... I did think about that, but I disliked the idea of two fields of nulls for every one fu

Re: [GENERAL] Partial foreign keys, check constraints and inheritance

2005-11-17 Thread Jaime Casanova
On 11/17/05, Eric E <[EMAIL PROTECTED]> wrote: > Hi all, >In my database application, I've repeatedly encountered a particular > issue, and I'm not sure I'm addressing it well, so I'd like suggestions > on how to deal with it. The problem is that I need something like a > partial foreign key -