Naming Objects and fields

  • Thread starter Thread starter LMB
  • Start date Start date
L

LMB

Access 2000. Are there any pros and cons to naming objects with long descriptive names vs abbreviated names? How about the fields?

Example

tblEmployeeDemographics or tblEmpDem


If I call the table EmployeeDemographics, can I call the fields

EmpLName
EmpFName

or is it better to spell out the entire name.

Should I use LastName instead of LName

Thanks,
Linda
 
I don't think there are any performance differences using long names vs.
short ones.

A pro are that the names are easier to understand, a con is that it's more
to type.


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Access 2000. Are there any pros and cons to naming objects with long
descriptive names vs abbreviated names? How about the fields?

Example

tblEmployeeDemographics or tblEmpDem


If I call the table EmployeeDemographics, can I call the fields

EmpLName
EmpFName

or is it better to spell out the entire name.

Should I use LastName instead of LName

Thanks,
Linda
 
in message
Access 2000. Are there any pros and cons to naming objects
with long descriptive names vs abbreviated names? How about the fields?

tblEmployeeDemographics or tblEmpDem
If I call the table EmployeeDemographics, can I call the fields

or is it better to spell out the entire name.
Should I use LastName instead of LName

I agree with Doug that there are probably no performance differences.
I think a better criteria would be, "What would be easier for you to
figure out if you needed to come back to this database a few years
from now?" I think consistency would be the key.

I try and follow these naming guidelines pretty closely:

http://www.ltcomputerdesigns.com/JCReferences.html#NamingConventions

I know of at least one person that follows these *exactly*, but
I think most experts do their own variations on the above guidelines.
As long as it is easy for you and consistent then you should be fine.

You'll also find some techniques of your own for naming objects.
For example, I name all of my queries that are Record Sources
for reports the same name as the report except for the "qry" prefix.
So if I have a report named rptDailyLaborPlan, then I name the
query that feeds it qryrptDailyLaborPlan. This makes it much easier
to trace down the source object. Also, all of my "report" queries
are then grouped together in the Database Window.

Another technique I use is for RWOP queries. For those types of
special queries I name them exactly the same as the table except
for the "qry" prefix. So the main RWOP query on tblVendors
would be qrytblVendors. Again, these are easier to spot and most
likely will be grouped together.

Just some ideas for you.
 
Linda,

Two years from now you need to be able to look at your database and remember
TblEmpDem contains Employee Demographics. If you don't think you will
remember, use the long name. You may not be the only one needing to work on
the database in the future. Use the name that you think makes it easier for
the next person.

<<If I call the table EmployeeDemographics>>
Don't revert back. You have beed doing well by starting table names with
"Tbl". Again, with Tbl, you'll always know the object is a table.


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
Access 2000. Are there any pros and cons to naming objects with long
descriptive names vs abbreviated names? How about the fields?

Example

tblEmployeeDemographics or tblEmpDem


If I call the table EmployeeDemographics, can I call the fields

EmpLName
EmpFName

or is it better to spell out the entire name.

Should I use LastName instead of LName

Thanks,
Linda
 
Jeff,

I follow the same convention as you for reports - RptMyReport. Additionally
I use SRptMySubreport for subreports. Forms, subforms and popup forms follow
the same conventions: FrmMyForm, SFrmMySubform and PFrmMyPopupForm.
RecordSource queries are named:
QryRptMyReport
QrySRptMySubreport
QryFrmMyForm
QrySFrmMySubform
QryPFrmMyPopupForm

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
 
I have noticed in certain views for things the object names are sometimes truncated and you can't see the whole name so I thought maybe abbreviations may be better for later on when I get to that level.

Personally, I like the long names.

Thanks,
Linda


I don't think there are any performance differences using long names vs.
short ones.

A pro are that the names are easier to understand, a con is that it's more
to type.


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Access 2000. Are there any pros and cons to naming objects with long
descriptive names vs abbreviated names? How about the fields?

Example

tblEmployeeDemographics or tblEmpDem


If I call the table EmployeeDemographics, can I call the fields

EmpLName
EmpFName

or is it better to spell out the entire name.

Should I use LastName instead of LName

Thanks,
Linda
 
in message
Access 2000. Are there any pros and cons to naming objects
with long descriptive names vs abbreviated names? How about the fields?

tblEmployeeDemographics or tblEmpDem
If I call the table EmployeeDemographics, can I call the fields

or is it better to spell out the entire name.
Should I use LastName instead of LName

I agree with Doug that there are probably no performance differences.
I think a better criteria would be, "What would be easier for you to
figure out if you needed to come back to this database a few years
from now?" I think consistency would be the key.

I try and follow these naming guidelines pretty closely:

http://www.ltcomputerdesigns.com/JCReferences.html#NamingConventions

I know of at least one person that follows these *exactly*, but
I think most experts do their own variations on the above guidelines.
As long as it is easy for you and consistent then you should be fine.

You'll also find some techniques of your own for naming objects.
For example, I name all of my queries that are Record Sources
for reports the same name as the report except for the "qry" prefix.
So if I have a report named rptDailyLaborPlan, then I name the
query that feeds it qryrptDailyLaborPlan. This makes it much easier
to trace down the source object. Also, all of my "report" queries
are then grouped together in the Database Window.

Another technique I use is for RWOP queries. For those types of
special queries I name them exactly the same as the table except
for the "qry" prefix. So the main RWOP query on tblVendors
would be qrytblVendors. Again, these are easier to spot and most
likely will be grouped together.

Just some ideas for you.
--
Jeff Conrad
Access Junkie
Bend, Oregon

Jeff,

I looked up RWOP query but I'm still not sure what it is. Is that something that you create or is it created when you set up the security?

Thanks for the great suggestions!

Linda
 
Thanks. Like I said in a previous post, I would rather use long descriptive names but I didn't want it to be a problem down the line.

Linda
Linda,

Two years from now you need to be able to look at your database and remember
TblEmpDem contains Employee Demographics. If you don't think you will
remember, use the long name. You may not be the only one needing to work on
the database in the future. Use the name that you think makes it easier for
the next person.

<<If I call the table EmployeeDemographics>>
Don't revert back. You have beed doing well by starting table names with
"Tbl". Again, with Tbl, you'll always know the object is a table.


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
Access 2000. Are there any pros and cons to naming objects with long
descriptive names vs abbreviated names? How about the fields?

Example

tblEmployeeDemographics or tblEmpDem


If I call the table EmployeeDemographics, can I call the fields

EmpLName
EmpFName

or is it better to spell out the entire name.

Should I use LastName instead of LName

Thanks,
Linda
 
Hi Linda,

Romulan Queen??
Nice.
What exactly is a Romulan Queen doing in Ten Forward?
I looked up RWOP query but I'm still not sure what it is.
Is that something that you create or is it created when you set up the security?

RWOP queries only come into play if you have applied User Level
Security to your database. And even in that case they are not *always*
needed in every situation. They just provide an extra level of data
protection. For a detailed explanation of RWOP queries, please review
the Security FAQ found here:

http://support.microsoft.com/?kbid=207793

For other User Level Security links, see the following page:

http://www.ltcomputerdesigns.com/JCReferences.html#Security
Thanks for the great suggestions!

You're welcome, glad to help.
Good luck with your project.
 
Jeff,

I follow the same convention as you for reports - RptMyReport. Additionally
I use SRptMySubreport for subreports. Forms, subforms and popup forms follow
the same conventions: FrmMyForm, SFrmMySubform and PFrmMyPopupForm.
RecordSource queries are named:
QryRptMyReport
QrySRptMySubreport
QryFrmMyForm
QrySFrmMySubform
QryPFrmMyPopupForm

Hi Steve,

That is pretty similar to something I follow as well, just not quite as extensive.
Right now I'm taking apart a rather large application, breaking into component
parts, adding/editing lots of new things, and then re-assembling back into one
container. I have found that using the mentioned naming conventions has
substantially helped with remembering how everything is related.
 
Hi Linda,

Romulan Queen??
Nice.
What exactly is a Romulan Queen doing in Ten Forward?
<vbg>

Hi Jeff,

I am from the 25th century and we all get along now so I am having some
Romulan Ale in Ten Forward with Mr. Data.

Thanks for the links......

Linda
 
LMB said:
Hi Jeff,

I am from the 25th century and we all get along now so I am having some
Romulan Ale in Ten Forward with Mr. Data.

Ahhhh, I see.

Say Hi to Dick Clark for me.
;-)
Thanks for the links......

You're welcome, glad to help.
 
Back
Top