For lookup tables we typically combine the names of the tables that are
being cross-referenced, ie:

tblUsers                        (User Data)
tblPermissions          (Permission Levels)
tblUsersPermissions     (User/Permission Relationship)

I suppose you could change that to lu_UsersPermissions or something that
references the fact that it's a lookup table.

Joshua Miller
Web Development :: Programming
Eagle Web Development LLC
www.eaglewd.com
[EMAIL PROTECTED]
(304) 622-5676 (Clarksburg Office)
(304) 456-4942 (Home Office)


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, June 12, 2002 10:50 AM
To: CF-Talk
Subject: RE: DB Table Naming Conventions


what about naming the actual tables? Do you have naming conventions 
for lookup tables, many to many relationship tables, data storage 
tables, ect?

I have seen people put a 'tbl' prefix to every table and an 'sp' 
prefix to all stored procedures... what else?

BJ

= = = Original message = = =

>>| From: Zac Spitzer [mailto:[EMAIL PROTECTED]]
>>| 
>>| I always name the pk of table  (table_name)_id...  I also

>>| tend to prefix ~ column names with an abbreviation of the

>>| table name, it makes life easier as there is more
>>| information there and when you start joining tables, there 

>>| is less conflict if u use common naming conventions

WOW! Someone else that does this.

I always use the a two letter abbreviation of the table name 
for the
beginning of every field in said table. This is SO helpful when 
doing
complex joins.

My typical convention is:

(For example only)

GUESTBOOK

GB_ID
GBFIRSTNAME
GBLASTNAME
GBEMAIL
GBCOMMENTS
GBDATEADDED

I use all caps because I camelback or lowercase all other variables, 
and
when I run across DB variables in forms and other bits of code, 
I'll
know immediately those vars are coming from the database, and 
not
something local, though most everything is scoped.

Erika
------------------------------------------------------------



______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to