I like the below method becase most DB programs sort tables in alpha order, so all your related tables group together.
When I do have to group two groups (it happens), I usually start the name with the "primary" table first (see caveat about english/spanish: big river / river big ;). A lot of this really depends on the amout of tables, RDBMS, etc.... i.e. sometimes a table might be "user" other times, "users". I think the important thing is to be consistent (This is where keeping your queries apart from the rest of the code comes in handy. If you need to re-reference your tables, you only have one place to go). Or, to link back to the "GIGO", so long as you've picked a format/place for writing your queries that you could say, easily change with a regex without having to worry about nicking something unintentionally... But best is probably: name your stuff consistently, and keep your DB logic in it's own realm. So long as you've stuck to a format, you can always code up a "schema rename-a" when you need to switch to a more supportive framework (It's never as smooth as you'd like, but it's a hell of a lot easier). Or sometimes, like was said, it's the preference of the DB admin, so if you're coding a project to be "portable", you better have a pretty easy method of changing the schema and whatnot. If you use test cases, you could find out pretty quick if your new "schema" fits the bill. Isaac's SQL abstraction layer would probably help in instances like this as well. No need to convert all those "TOP"s to "LIMiT"s ;-) (I'm guessing, as I haven't checked it out yet, but it does sound like a "good idea"). Eh. Food for thought. On 4/14/06, Shepherd, Brandon <[EMAIL PROTECTED]> wrote: > > I preface all table names with 3 character group reference. > > SECURITY > SEC_Roles PK=Role_Key > SEC_Users PK=User_Key > SEC_User_Roles PK=User_Role_Key > FK=Role_Key > FK=User_Key > > BILLING > BIL_Invoices PK=Invoice_Key > BIL_Payments PK=Payment_Key > BIL_Invoice_Payments > FK=Invoice_Key > FK=Payment_Key > > Etc... > > -B > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237823 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

