[thelist] SQL - Foreign Key Constraint - in another database?

Warden, Matt mwarden at mattwarden.com
Tue Sep 4 14:13:24 CDT 2001

On Sep 4, spinhead had something to say about Re: [thelist] SQL - Foreign...

>I'm not convinced, Matt.. Tables are inherently collections of whatever,
>implying plurality (as you said.) If the plurality is implied, shouldn't it
>be named? 

My point was that, since it's implied, the naming of the table could
either be all plural or all singular. There are a lot of rules that come
along with plurals, and, well, singular is singular.

>Also makes queries (my simple little ones, anyway) flow more
>naturally, the plural looking more like language rather than abstract code.

well, maybe in your head it does.

select some fields from the table of employees
select some fields from the employee table
select some fields from the employees table

1 flows ok.
2 flows ok.
3 sounds wrong to me.

>I'm not an old hand at db admin by any means, so I'm genuinely interested in
>this kind of feedback, but this seems backward to me. Are there admin
>issues, etc. you've run into, or is it a personal preference thing?

To me it's just simpler. To be honest, I trapped you...

>p.s. CATEGORIES, OCTOPI, and FISH. Plural is plural, so CATEGORYS is just a

CATEGORYS is a misspelling? Would it interest you to know that the evolt
database, designed partly/mostly(?) by rudy has a table named CATEGORYS?

The point is not that you're wrong, or rudy/evolt was wrong. The point is
that this problem woudln't exist if the table was named CATEGORY.

I'm assuming that CATEGORYS came from a practice of just adding 'S' to the
end of everything to avoid these plural rules. Why not just avoid
plurality in the names altogether?

>In my databases I use the strict Latin plurals, so OCTOPUSSES
>wouldna happen. Finally, isn't FISH already plural?

Sure. I know that, and you know that, but does that mean that's why the
DBA or Data Modler chose as their table name? It's just good practice,
IMO. Kind of a "you can avoid problems doing it this way, so why
not?" kind of thing.


More information about the thelist mailing list