Prefix's for field names

KenHigg

Registered User
Local time
Today, 07:09
Joined
Jun 9, 2004
Messages
13,291
I have been looking at the way I name fields and thought I'd Google the topic. Seems to be a split as to prefix names or not. Looks like the SQL Sever and Oracle groups say not to while Access users are kind of directed to use them...

While I have not prefixed names in the past, I was going to do my next db with the things like:

intMyFldName
strMyFldName
etc...

Where as in the past I would do something like:

my_fld_name_one
my_fld_name_two
etc...

What do you all see as some of the pro's and con's?
 
I don't prefix fields - probably the only thing I don't.
 
Hum... I'm leaning that way. Guess I'll go back and take them out before I get too far along. Mainly because some are in SQL Server and might be, say a varchar, and Access don't have such a type... So I guess my reason would be because of an inconsistency of data types, (data type names(?)), between platforms (?)
 
Last edited:
It is matter of personal preference UNLESS you have a company or customer policy to consider.

For instance, about 5 employers ago, the standard was whatever we made it. We chose to live without prefixes. In my current job, the company has no standards (well, not exactly true because...); the customer has strict standards, and we of course do as requested. It's for a good cause - my paycheck!

In a really big project, prefixing fields by a type code might be good for maintenance purposes. The smaller and less the complex the project, the less likely it is to need the mnemonic value of field-type prefixes.

HOWEVER, please note also that when two independent fields have similar names, a distinguishing prefix can be a good thing and a viable approach to prevent confusion.

In the final analysis, any choice you make is right - for you. But once you choose your own development policy, stick with it.
 
I'll add my 2 cents. I also don't prefix field names. But I generally prefix all other objects. You can determine the data type of a field by looking in the table definition. But with other objects its not so obvious.
 
Your advice is worth a lot more than 2 cents, Scott. Just proves there is more than one way to skin a cat. MMMMEEEEEOOOOOOWWWWWWRRRRRR :eek:
 
The top three concur... Done deal :)
.
.
.
 
When you drag a fld from a fld list onto a form, the text box that is created inherits the fld name as it's name. Do you change these text box names to have a prefixes' as well?
 
KenHigg said:
When you drag a fld from a fld list onto a form, the text box that is created inherits the fld name as it's name. Do you change these text box names to have a prefixes' as well?


I generally build my forms using the wizard, I then go in and change the names. Same thing if I add fields using the field list.
 

Users who are viewing this thread

Back
Top Bottom