We usually do something like so:

Stored Proc:    sp_whatever
Views:          vw_whatever
Tablename:              tblUsers, tblPermissions, etc.
Fields:         Always prefixed with table-related text as such:
                        userID (PK/ID)
                        ufirstname
                        ulastname
                        uaddress1
                        uaddress2
                        ucity
                        ustate
                        uzip
                        etc.

That just makes it easier for me to see what field is related to what
table - especially when you have similar data in multiple fields (which
we try to avoid by abstracting the database as much as possible - but
sometimes is necessary).

There may be a better way or a more suitable way for your programming
style.

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: Zac Spitzer [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, June 12, 2002 10:20 AM
To: CF-Talk
Subject: Re: DB Table Naming Conventions


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[EMAIL PROTECTED] wrote:
| I'm just curious, What naming conventions for DB tables do you use?


this is a biggy :-) a lot of php developers that work with mysql, a non
relational db use pk names of ID....

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

z

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6-2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAj0HWKMACgkQm98oI6K7h0gxUQCgjUvOt0+YVHgz/Qyh8RlAawAp
CrwAoOwShhA1t7xZpiKsaYQ3Cdz8Supo
=YXc3
-----END PGP SIGNATURE-----


______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
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