[thelist] Database Naming Conventions

Joshua Olson joshua at waetech.com
Wed Mar 15 15:18:39 CST 2006

> -----Original Message-----
> From: Ken Moore
> Sent: Wednesday, March 15, 2006 4:05 PM
> The conventions I follow  are these. Tables are named in 
> the singular and fields contain with a table reference.
> Tables: Employee, Customer
> Fields: emplFName, emplLName, custFName, custLName
> It works for me because every variable is unique and it helps 
> me to avoid getting confused..

(puts on his boxing gloves)


I understand where you are coming from, but there are mechanisms in place to
resolve ambiguities.  So, how is making the columns unreadable  any better
than getting in the habit of prefacing the column name with the table name
when building joined queries?  For example:

SELECT employee.fname
     , employee.lname
     , customer.fname AS customer_fname
     , customer.lname AS customer_lname
FROM employee
INNER JOIN customer
ON customer.employee_id = employee.id


Joshua L. Olson
WAE Technologies, Inc.
Phone: 706.210.0168
Fax: 413.812.4864

Monitor bandwidth usage on IIS6 in real-time:

More information about the thelist mailing list