Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Naming Fields in a Table 2

Status
Not open for further replies.

rj51cxa

Technical User
Mar 16, 2006
216
GB
I am about to construct a new database but, before I start constructing the tables, I would like to be certain that I am following the correct field naming convention.

There appear to be conflicting views on whether or not to prefix the name of a field in a table with such things as "Str" or "Int" etc. I think I am correct in thinking that the Mocrosoft Northwind Examples do not use prefixes but other people appear to recommend them.

I would be grateful if someone could give me a definitive answer.

Best Regards
John
 
give me a definitive answer
IMHO, there is NO DEFINITIVE answer.
The more important, for me, is to avoid special characters (like space or # or ...) and to not use reserved words (like Date, Time, ...)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks PHV and r937, I was rather hoping that would be the way forward. I'll just avoid spaces and reserved words.

On the subject of reserved words, is there a list of these anywhere?

Best Regards
John
 
I use a naming convention that prefixes each field with 3 characters from the table it comes from. I don't have any two fields in a database with the same name. I always know which table a field is from and I always know which field is the primary ke.

For instance:
[tt]
tblEmployees
================
empEmpID autonumber primary key
empFirstName
empLastName
empLogin
empPassword

tblProjects
================
prjPrjID autonumber primary key
prjTitle
prjDescription

tblRoles
==================
rolRolID autonumber primary key
rolTitle

tblEmployeeProjects
===============
eprEPrID autonumber primary key
eprEmpID links to tblEmployees.empEmpID
eprPrjID links to tblProjets.prjPrjID
eprRolID links to tblRoles.rolRolID
epr...
[/tt]

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Thanks dhookom for your idea, it seems that any convention goes, as long as it is consistent.

Thanks also r 937 for the list of reserved words. I have bookmarked this for furure reference.

Best Regards
John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top