A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Object Naming Conventions



 
 
Thread Tools Display Modes
  #1  
Old February 3rd, 2009, 02:29 AM posted to microsoft.public.access.tablesdbdesign
Brian Carlson
external usenet poster
 
Posts: 49
Default Object Naming Conventions

Do underscores in object names cause any issues? Such as Daily_Report? Any
tips on object naming conventions that seem to work best? Thanks in advance.
  #2  
Old February 3rd, 2009, 02:52 AM posted to microsoft.public.access.tablesdbdesign
Rick Brandt
external usenet poster
 
Posts: 4,354
Default Object Naming Conventions

On Mon, 02 Feb 2009 18:29:01 -0800, Brian Carlson wrote:

Do underscores in object names cause any issues? Such as Daily_Report?
Any tips on object naming conventions that seem to work best? Thanks in
advance.


Underscores are fine. I prefer Camel-Case as in "DailyReport" myself,
but underscores are better than spaces or dashes.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
  #3  
Old February 3rd, 2009, 03:13 AM posted to microsoft.public.access.tablesdbdesign
Allen Browne
external usenet poster
 
Posts: 11,706
Default Object Naming Conventions

Underscores are fine for objects in Access.
(You may want to avoid them in class modules.)

There are many styles of naming convention.
A popular one uses 3-char prefixes:
http://www.xoc.net/standards/rvbanc.asp#DAO

Others use different systems, e.g.:
http://www.granite.ab.ca/access/tablefieldnaming.htm
http://www.granite.ab.ca/access/tony...onventions.htm

Some factors to consider:
- In some contexts, it can be hard to know whether a source is a table or
query if you use no naming convention.

- Use A-Z, 0-9, and underscore only, and don't use leading numbers. (This
avoids several issues where you would have to type square brackets around
names.)

- Object names are not case sensitive, but camel case may make it easier to
read. It's up to you whether DailyReport is faster to type than
Daily_Report.

- Consider what additional distinctions you want to make, e.g. a prefix to
distinguish local tables (that exist in the front end) from attached tables
(in the back end.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Brian Carlson" wrote in message
...
Do underscores in object names cause any issues? Such as Daily_Report?
Any
tips on object naming conventions that seem to work best? Thanks in
advance.


  #4  
Old February 3rd, 2009, 03:17 AM posted to microsoft.public.access.tablesdbdesign
Brian Carlson
external usenet poster
 
Posts: 49
Default Object Naming Conventions

Thanks for the answer Rick. I am intending on using Camel-Case, but I would
like to make the names as clear as possible such as: table_DailyReport or
tbl_DailyReport, but want to ensure that my naming conventions do not cause
me any issues in the future in case I learn enough to expand my database.

"Rick Brandt" wrote:

On Mon, 02 Feb 2009 18:29:01 -0800, Brian Carlson wrote:

Do underscores in object names cause any issues? Such as Daily_Report?
Any tips on object naming conventions that seem to work best? Thanks in
advance.


Underscores are fine. I prefer Camel-Case as in "DailyReport" myself,
but underscores are better than spaces or dashes.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

  #5  
Old February 3rd, 2009, 12:38 PM posted to microsoft.public.access.tablesdbdesign
Rick Brandt
external usenet poster
 
Posts: 4,354
Default Object Naming Conventions

On Mon, 02 Feb 2009 19:17:02 -0800, Brian Carlson wrote:

Thanks for the answer Rick. I am intending on using Camel-Case, but I
would like to make the names as clear as possible such as:
table_DailyReport or tbl_DailyReport, but want to ensure that my naming
conventions do not cause me any issues in the future in case I learn
enough to expand my database.


I'm not a fan of object-type-prefixing, but many do use it. Bottom line
is if it makes sense to you, then use whatever convention you like.
Consistency is a best practice, but there are no naming convention police
that will come knocking on your door.

As for "causing problems" that is pretty much limited to avoiding certain
characters. I never use anything besides A-Z, 0-9, and the underscore.
While Access and SQL Server allow "sloppy" naming you never know when you
might end up working with another engine or tools that are more strict.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
  #6  
Old February 3rd, 2009, 02:29 PM posted to microsoft.public.access.tablesdbdesign
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Object Naming Conventions

While Access and SQL Server allow "sloppy" naming you never know when you
might end up working with another engine or tools that are more strict.


Rick,

Just an observation I made, Access 2007 is a little more intolerant then
it's predecessors when it come to "sloppy" naming.
--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Rick Brandt" wrote in message
...
On Mon, 02 Feb 2009 19:17:02 -0800, Brian Carlson wrote:

Thanks for the answer Rick. I am intending on using Camel-Case, but I
would like to make the names as clear as possible such as:
table_DailyReport or tbl_DailyReport, but want to ensure that my naming
conventions do not cause me any issues in the future in case I learn
enough to expand my database.


I'm not a fan of object-type-prefixing, but many do use it. Bottom line
is if it makes sense to you, then use whatever convention you like.
Consistency is a best practice, but there are no naming convention police
that will come knocking on your door.

As for "causing problems" that is pretty much limited to avoiding certain
characters. I never use anything besides A-Z, 0-9, and the underscore.
While Access and SQL Server allow "sloppy" naming you never know when you
might end up working with another engine or tools that are more strict.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:15 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.