I tend to follow Ryan's naming conventions for columns (e.g. user_id in the user table) and I also understand what Josh is asking. I'm also a little obsessive about being able to quickly find tables or files or any other object that might be present in a list. To his question, I often use 'lnk_' to denote linking tables and 'lu_' to denote lookup tables.
In a database with many tables (or a directory with many files), simple prefixes (or any such naming convention) make finding what I'm looking /so/ much quicker. Perhaps bordering on OCD, sometimes, but it works for me. On 4/14/06, Ryan Guill <[EMAIL PROTECTED]> wrote: > Personally, I always make the primary key of a single table, > tablenameID, so if its a user table, the primary key is userID. If > userid is used as a foreign key anywhere else in my database, its > called userID. A better way to put it is, if I have the same > columnname in two tables, its a foreign key. And usually the ID at > the end of any column can tip you off to that fact. > > But thats just me personally. > > On 4/14/06, Adrian Lynch <[EMAIL PROTECTED]> wrote: > > :OS <--<< that's me turning up my nose to the LT_ and FK_! > > > > I prefer UsersToGroups for your example. > > > > -----Original Message----- > > From: John McKown [mailto:[EMAIL PROTECTED] > > Sent: 14 April 2006 14:05 > > To: CF-Talk > > Subject: database linking table naming conventions? > > > > > > Imagine these two database tables: "Users" and "Groups" > > > > You want a Foreign Key table to link them together (or what I call a linking > > table) that might be named "UserGroups". > > > > But "UserGroups" as a table name itself does not stand out in the table list > > because it does not use a prefixed naming convention (something I like about > > Fusebox on the web side). > > > > Examples table names might be: "LT_Users_Groups" or.... "FK_Users_Groups". > > > > Is there an understood standard there? Also, the order of the table names > > might need to be taken into account based on where the foreign keys are. > > > > Thoughts? > > > > > > John McKown > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237783 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