J
John Harrington
Suppose I have a table where I want two fields to be exclusive, such
that when one field has a specified value the other in the same record
cannot take a value and vice versa.
For example, imagine a student db where students are either graduate
or undergraduate level students. One field relates to a table of
graduate programs. The other field relates to a table of
undergraduate programs. A student can take one path or the other, but
not both simultaneously.
Is my desire to do this sort of exclusion a symptom of bad table
design, and, if so, what should I do besides?
If not, how do I make the fields exclusive, preferably in the design
of the table itself?
Thanks,
John
that when one field has a specified value the other in the same record
cannot take a value and vice versa.
For example, imagine a student db where students are either graduate
or undergraduate level students. One field relates to a table of
graduate programs. The other field relates to a table of
undergraduate programs. A student can take one path or the other, but
not both simultaneously.
Is my desire to do this sort of exclusion a symptom of bad table
design, and, if so, what should I do besides?
If not, how do I make the fields exclusive, preferably in the design
of the table itself?
Thanks,
John