Re: [GENERAL] Foreign key to a view (UNION of two or more tables),

2005-06-29 Thread Enrico Weigelt
* Karl O. Pinc <[EMAIL PROTECTED]> wrote: > So the problem then is that there are codes (e.g. cities) that are > used by multiple questions, sometimes optional or N/A is allowed > and sometimes not. For such cases you could introduce another layer, like a datatype. Each question can be answered

Re: [GENERAL] Foreign key to a view (UNION of two or more tables), any alternative?

2005-06-20 Thread Bruno Wolff III
On Sun, Jun 19, 2005 at 17:16:34 +0100, Jose Gonzalez Gomez <[EMAIL PROTECTED]> wrote: > > > There would be no problem in doing so with such an easy case, but > think about having a table with cities (hundred, thousands?) and then > have four copies for each of the above posibilities with its re

Re: [GENERAL] Foreign key to a view (UNION of two or more tables), any alternative?

2005-06-20 Thread Jose Gonzalez Gomez
On 6/19/05, Karl O. Pinc <[EMAIL PROTECTED]> wrote: > > On 06/19/2005 11:16:34 AM, Jose Gonzalez Gomez wrote: > > On 6/17/05, Bruno Wolff III <[EMAIL PROTECTED]> wrote: > > > On Fri, Jun 17, 2005 at 14:35:01 +0200, > > > Jose Gonzalez Gomez <[EMAIL PROTECTED]> wrote: > > > > > > > > The problem

Re: [GENERAL] Foreign key to a view (UNION of two or more tables),

2005-06-19 Thread Karl O. Pinc
On 06/19/2005 11:16:34 AM, Jose Gonzalez Gomez wrote: On 6/17/05, Bruno Wolff III <[EMAIL PROTECTED]> wrote: > On Fri, Jun 17, 2005 at 14:35:01 +0200, > Jose Gonzalez Gomez <[EMAIL PROTECTED]> wrote: > > > > The problem comes when you have questions that may be not applicable > > (8), or optio

Re: [GENERAL] Foreign key to a view (UNION of two or more tables), any alternative?

2005-06-19 Thread Jose Gonzalez Gomez
On 6/17/05, Bruno Wolff III <[EMAIL PROTECTED]> wrote: > On Fri, Jun 17, 2005 at 14:35:01 +0200, > Jose Gonzalez Gomez <[EMAIL PROTECTED]> wrote: > > > > The problem comes when you have questions that may be not applicable > > (8), or optional (doesn't know, doesn't answer) (9). The easy solution

Re: [GENERAL] Foreign key to a view (UNION of two or more tables), any alternative?

2005-06-17 Thread Bruno Wolff III
On Fri, Jun 17, 2005 at 14:35:01 +0200, Jose Gonzalez Gomez <[EMAIL PROTECTED]> wrote: > > The problem comes when you have questions that may be not applicable > (8), or optional (doesn't know, doesn't answer) (9). The easy solution > would be to have four tables: > > yes_no > yes_no_not_applic

[GENERAL] Foreign key to a view (UNION of two or more tables), any alternative?

2005-06-17 Thread Jose Gonzalez Gomez
Hi there, I have the following problem: I'm developing some forms for data entry for some clinical studies, with data stored on a PostgreSQL database. The study is based in a questionnaire, with stablished options for almost every question. They want answers to be stored as numeric codes so they c