Best Practice for tables?

D

David W. Fenton

Personal preference. On the other hand, I agree with Tony - I
don't see any reason to prefix tables with TBL or fields with fld.
That usually just means more typing for no real benefit that I
see. Again, if it works for you - go ahead and use it.

I don't do it for fieldnames in tables, but I do use it for tables.
Indeed, I use tbl for regular tables, tmp for temp tables and arc
for archive tables, often all three in a single application. If
you're not distinguishing different table types, though, I guess
there wouldn't be much benefit.

I don't distinguish query types (e.g., append vs. select vs. update
vs. delete) with prefixes, so logically, it would make more sense
for *me* to use my 3 prefixes on tables, and no prefix on queries.

But that would likely confuse other developers. Using the standard
tbl and qry makes it easier someone else to understand my design, as
it makes things very obvious, and keeps the table and query
namespaces distinct.
 
D

David W. Fenton

I use the Leszynski/Reddick naming convention, almost
exactly as it was published. I only do it because other
programmers often work on the same projects and I like to maintain
some consistency with a generally accepted method. If you are the
only person working then whatever consistency you use is really up
to you.

Well, I think there's something to be said for using it even if
you're the only developer who is scheduled to work on the project.
It's a selling point to the client that you use the
industry-standard naming conventions, rather than some idiosyncratic
naming convention of your own, because someday in the future,
someone else may be working on the project.

I hate working on my very old projects, because I had no systematic
naming convention. It drives me nuts and eats up time while I figure
out what the hell everything is.
 
D

David W. Fenton

Now I have a much larger system with 160 tables, 1200 queries, 450
forms and 350 reports. But that would be rather long for folks to
look at the names.

But querydefs and tabledefs have a shared namespace, i.e., you can't
have an object of the same name in both collections, and the Access
UI in some contexts presents a combined list of both. In a large
project, how do you tell which is which in those lists?

And how do you associate similar objects, such as a secured base
table and its corresponding RWOP query?
 
T

Tony Toews [MVP]

David W. Fenton said:
But querydefs and tabledefs have a shared namespace, i.e., you can't
have an object of the same name in both collections, and the Access
UI in some contexts presents a combined list of both. In a large
project, how do you tell which is which in those lists?

Look at the object names. Queries have spaces in them and are longer.
Tables don't.
And how do you associate similar objects, such as a secured base
table and its corresponding RWOP query?

I don't use RWOP permissions or security. Although I'd figure
something out there.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
T

Tony Toews [MVP]

David W. Fenton said:
Uh, what Steve wrote looks a lot like what I would have said if he
hadn't gotten there first.

Except, I probably would have been more harsh.

Ok, maybe I'll let Steve get away with that one then.
I think, because of the fact that Access presents a combination of
the TableDefs and QueryDefs collections in some contexts, that it's
crucial to distinguish them by a prefix (it could be just t or q),
and because they share a single namespace (i.e., you can't have a
query and a table with the exact same name).

Likewise, I think it's great to be able to have a table and a query
with the same base name, so you can tell that the query presents the
data from a particular table. This is particularly important when
you have ULS and need to use RWOP queries. Your tblPerson would be
edited via the RWOP query qryPerson. That seems to me to be an
extremely logical way of organizing things.

How would you do the same thing without prefixes? Suffixes?

Yes, I would use some kind of suffix.

Granted to each thier own.

But to me on a large FE it is very, very handy to hit the first letter
of a group of objects in the database container window and get there
fast.

That overrides any of the q and t stuff. I still maintain that's a
complete waste of time.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
S

Steve

Repeatedly MVPs advise posters not to use spaces in object names and here
you are going against "learned" advise and putting spaces in query names????
So besides wasting a lot of time typing long object names, you have to
remember to put square brackets around your query names. Do you put square
brackets around table names or do you use another set of rules for table
names?

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
S

Steve

No one has yet mentioned form and report names. I prefix all form names with
Frm and prefix all subreport names with SFrm. I get two distinct advantages
from this. First, when I look at the forms database window, all form names
appear first and all subform names are grouped separately from form names.
Second, it helps to catch errors when referencing forms and subforms..

The way I name reports and subreports is similar to the way I name forms and
subforms. I prefix reports with Rpt and I prefix subreports with SRpt. The
advantages for reports are the same as the advantages for forms.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
T

Tony Toews [MVP]

Steve said:
Repeatedly MVPs advise posters not to use spaces in object names and here
you are going against "learned" advise and putting spaces in query names????

Correct.

I view myself as one of the "learned" advisors. And I hold a
contrary opinion to most on this topic. As I do others. So my
attitude varies somewhere between tough and who cares.
So besides wasting a lot of time typing long object names,

Reread a previous posting on this topic. I do *not* type long object
names.
you have to
remember to put square brackets around your query names.

Whenever I use queries embedded in VBA I create the query the first
time using the query builder which takes care of everything anyhow.
So that's a non issue too.
Do you put square
brackets around table names or do you use another set of rules for table
names?

No, no need.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
G

Gina Whipp

I hate working on my very old projects, because I had no systematic
naming convention. It drives me nuts and eats up time while I figure
out what the hell everything is.

I feel your pain... been there done that!
 
S

Steve

BTW Tony you always give your full support to Arno R and John Marshall but
you request I keep a civil keyboard. Is this the brotherhood of MVPs that
you always have to support another MVP? Someone asked recently in a post if
the "P" in MVP means you are dedicated to displaying Professional conduct.
John Marshall's conduct is anything but Professional and yet you give him
your full support.

Unbelievable Tony!!!!!!!!!!

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
G

Gina Whipp

Thanks for sharing!

Interesting, I try to stay away from spaces when naming ANY object, just to
avoid those extra key strokes.

--
Gina Whipp

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

Tony Toews [MVP]

Steve said:
No one has yet mentioned form and report names. I prefix all form names with
Frm and prefix all subreport names with SFrm. I get two distinct advantages
from this. First, when I look at the forms database window, all form names
appear first and all subform names are grouped separately from form names.
Second, it helps to catch errors when referencing forms and subforms..

The way I name reports and subreports is similar to the way I name forms and
subforms. I prefix reports with Rpt and I prefix subreports with SRpt. The
advantages for reports are the same as the advantages for forms.

And again, and for the same reasons, I view this as an waste of time.
Sub reports and sub forms I name with a suffix such as sbf or
something like " - Emails sbf" if there are more than one subform or
subreport.

In my opinion it's much, much easier to work with the parent
form/report and the sub form/sub report next to each other in the
database container window.

But then I routinely work with databases with hundreds of objects.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
T

Tony Toews [MVP]

Gina Whipp said:
Thanks for sharing!

You're welcome. This is an interesting discussion.
Interesting, I try to stay away from spaces when naming ANY object, just to
avoid those extra key strokes.

But if you read one of my other postings extra key strokes aren't a
problem for me.

"Whenever I use queries embedded in VBA I create the query the first
time using the query builder which takes care of everything anyhow.
So that's a non issue too."

and

"When I need a object name I click once on the object, wait a
second, click again as though I were going to rename the object and
copy the name. Done. No typos."

I also make extensive use of Notepad as a very temporary "clipboard".

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
T

Tony Toews [MVP]

Started a new thread as this has no bearing on the interesting topic
at hand.
BTW Tony you always give your full support to Arno R and John Marshall but
you request I keep a civil keyboard.

And I should really do the same for David Fenton. Sometimes he gets a
slight bit snarky for lack of a better word.
Is this the brotherhood of MVPs that
you always have to support another MVP?

Not at all. Most of the time we agree.

And you're soliciting customers in this forum is not acceptable.
Someone asked recently in a post if
the "P" in MVP means you are dedicated to displaying Professional conduct.
John Marshall's conduct is anything but Professional and yet you give him
your full support.

Unbelievable Tony!!!!!!!!!!

<shrug> Oh well.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
S

Steve

<<And I hold a contrary opinion to most on this topic. As I do others. So
my
attitude varies somewhere between tough and who cares.>>

And so does this also apply to offering help to newsgroup posters when it is
clear the OP could use special help or needs more help beyond what he is
likely to get from the newsgroup?

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
S

Steve

You said elsewhere --
<<And I hold a contrary opinion to most on this topic. As I do others. So
my attitude varies somewhere between tough and who cares.>>

You said here in reference to MVPs--
<<Most of the time we agree.>>

Which is the true answer; number 1 or number 2?

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
S

Steve

David,

Tony said in his post just above that you "...gets a slight bit snarky..."

What does "snarky" mean?

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
T

Tony Toews [MVP]

Steve said:
And so does this also apply to offering help to newsgroup posters when it is
clear the OP could use special help or needs more help beyond what he is
likely to get from the newsgroup?

Responded to in another thread titled Question by Steve.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
T

Tony Toews [MVP]

"
<<And I hold a contrary opinion to most on this topic. As I do others. So
my attitude varies somewhere between tough and who cares.>>

And so does this also apply to offering help to newsgroup posters when it is
clear the OP could use special help or needs more help beyond what he is
likely to get from the newsgroup?

Totally different situation Steve and you know it. That's called
soliciting for work in the newsgroups.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top