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:237777
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

Reply via email to