2008/11/20 Alan Livie <[EMAIL PROTECTED]>

> I prefer Users, Groups, Orders as my db tables .... avoids the reserved
> words problem .... I have an Order class and object though but my db tables
> are plural.
>
> I'm with Stephen on this. Reserved words as table and column names annoy me
> too
>

This is pretty much what I do if I have to, but I try to be even more
descriptive.  Groups are usually UserGroup(s), ProductGroup(s) etc -
pluralised depending on which way the wind is blowing.  Its often the case
that I have multiple groupings in an application and they shouldn't
necessarily live in the same table. 5th normal form and all that....

Another method that I've used in the past is prefixes : tblUser, tblGroup,
lnkUserGroup (lnk being "link" and o2m/m2o relationship table between User
and Group), vSomeView, spSomeStoredProcedure.

At the minute I'm working with a internal framework that has a lot of tables
for various functions. These all have their own prefix. The rule of thumb
for custom client tables is to prefix them with a client code eg. Team193
would probably be t193_mytable.

Prefixes do have the benefit of helping to group your tables in a fashion
that is useful to the database developer, but aren't always appropriate in
the code and can make your code a bit unreadable, so this is why I like
aliases in Transfer. :D  I tend to hide the prefixes via the package/object
set up, because when you start looking at data objects you don't really need
to know that its tbl or a lnk and I can get rid of the client prefix I know
this is client X's application - that's all being dealt with by transfer.

Regarding pluralising - I do tend towards not pluralising, but once in a
while one slips through the net. I think Orders is one of those.

I think I could probably keep writing all sorts of stuff, but that'll do for
the minute.
Basically, just say NO! to using reserved words for database tables and
columns! ;)

Regards

Stephen

--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to