![]() | |
#31
| |||
| |||
|
|
On Jul 11, 2:56 pm, Richard Robinson <richa... (AT) privacy (DOT) net> wrote: Gene Wirchenko said: Ed Prochak <edproc... (AT) gmail (DOT) com> wrote: The point is, in a RELATIONAL database you have a relation between the primary key and the dependent attributes. IOW, you only need one table with at least two columns to have a relation. Nope. You can have a relation with only one column. It would be purely a lookup, but you could. Ok. So, a single table having only one column and only one row ... ? Gene is more of a purist than I am, and Yes, a single column table is technically a relation. (the number of rows does not matter). |
|
makes a good point that I overlooked. If you need a list of something, say colors, then you can have a COLORS table with one column COLOR, the PK is that one column. There is no use in creating a ID column to be the PK. Then you can have a CARS table with a COLOR column that is a Foreign Key referencing the COLOR column of the COLORS table. That way you cannot put a COLOR value in the CARS table that is not in the COLORS table. |
![]() |
| Thread Tools | |
| Display Modes | |
| |