Connecting Tech Pros Worldwide Help | Site Map

Spaces In Object And Field Names

Wayne
Guest
 
Posts: n/a
#1: Jun 14 '07
I have been given the task of rewriting a database that seems as
though it has been written by someone with a very basic understanding
of Access. Many of the object names and field names in tables are
overly long and contain spaces e.g. "Next of kin phone number" instead
of something like "KinPhNo".

I am looking for opinions on whether I should spend considerable extra
development time and "fix" all the problem names. I know that this is
the right thing to do, but it is tempting to go with what is there to
save time. I have a bad feeling though that this could come back and
bite me!

Any advice is appreciated.

Tom van Stiphout
Guest
 
Posts: n/a
#2: Jun 14 '07

re: Spaces In Object And Field Names


On Wed, 13 Jun 2007 16:53:40 -0700, Wayne <cqdigital@volcanomail.com>
wrote:

You are rewriting (I assume that means: from scratch), so you can
choose any field names you want. Do not "rewrite" the application
"in-place"; that typically is a recipe for disaster.

Someone with basic knowledge probably made much more severe blunders
than spaces in the field names. I'm hoping you're several notches up
from that, so you may for example create a much better database
design, based on solid and documented analysis. That's where a lot of
rookies make big mistakes.

-Tom.
Quote:
>I have been given the task of rewriting a database that seems as
>though it has been written by someone with a very basic understanding
>of Access. Many of the object names and field names in tables are
>overly long and contain spaces e.g. "Next of kin phone number" instead
>of something like "KinPhNo".
>
>I am looking for opinions on whether I should spend considerable extra
>development time and "fix" all the problem names. I know that this is
>the right thing to do, but it is tempting to go with what is there to
>save time. I have a bad feeling though that this could come back and
>bite me!
>
>Any advice is appreciated.
Allen Browne
Guest
 
Posts: n/a
#3: Jun 14 '07

re: Spaces In Object And Field Names


If you are writing a new database, from scratch, to do the whole job in a
better way, by all means use the field names that are convenienent to you.

If you are just modifying the existing database to fix problems, renaming
fields just because they contain a space would be a waste of your time. The
practical problem with the long names and spaces is that it takes longer to
type them (the long names and the square brackets you must add each time),
but if someone has already done all that, there is no point you wasting your
time again changing them back just so that they did not have to waste so
much time in the first place.

--
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.

"Wayne" <cqdigital@volcanomail.comwrote in message
news:1181778820.283329.179940@o11g2000prd.googlegr oups.com...
Quote:
>I have been given the task of rewriting a database that seems as
though it has been written by someone with a very basic understanding
of Access. Many of the object names and field names in tables are
overly long and contain spaces e.g. "Next of kin phone number" instead
of something like "KinPhNo".
>
I am looking for opinions on whether I should spend considerable extra
development time and "fix" all the problem names. I know that this is
the right thing to do, but it is tempting to go with what is there to
save time. I have a bad feeling though that this could come back and
bite me!
>
Any advice is appreciated.
rkc
Guest
 
Posts: n/a
#4: Jun 14 '07

re: Spaces In Object And Field Names


Wayne wrote:
Quote:
I have been given the task of rewriting a database that seems as
though it has been written by someone with a very basic understanding
of Access. Many of the object names and field names in tables are
overly long and contain spaces e.g. "Next of kin phone number" instead
of something like "KinPhNo".
>
I am looking for opinions on whether I should spend considerable extra
development time and "fix" all the problem names. I know that this is
the right thing to do, but it is tempting to go with what is there to
save time. I have a bad feeling though that this could come back and
bite me!
>
Any advice is appreciated.
My advice is do not abbreviate your field names to the point that
they are obfuscated. KinPhNo sucks worse than Next of kin phone number
in my opinion. At least you can enclose Next of kin phone number in
square brackets and understand what the hell it represents.
Wayne
Guest
 
Posts: n/a
#5: Jun 14 '07

re: Spaces In Object And Field Names


Thanks all for the replies. No, I am not rewriting the application
from scratch and what you say Allen, regarding renaming the fields
being a waste of time makes sense. If I leave them as they are, not
only will it save the time renaming them, but queries that use these
field names will remain intact as well. I may well be able to use or
modify many of these queries which will save even more time.


bobh
Guest
 
Posts: n/a
#6: Jun 14 '07

re: Spaces In Object And Field Names


Hi,
I have 'redone' or 'enhanced' several databases which were written
without standard naming conventions. I generally rename things and I
use a third party product which is an add-in called 'Find & Replace'
to do that. There are others like SpeedFeret(I think it's called),
using one of these product to do the renaming takes much less time and
has made the database much easier to understand and maintain for me
and the next guy that takes it over.
bobh.


On Jun 13, 7:53 pm, Wayne <cqdigi...@volcanomail.comwrote:
Quote:
I have been given the task of rewriting a database that seems as
though it has been written by someone with a very basic understanding
of Access. Many of the object names and field names in tables are
overly long and contain spaces e.g. "Next of kin phone number" instead
of something like "KinPhNo".
>
I am looking for opinions on whether I should spend considerable extra
development time and "fix" all the problem names. I know that this is
the right thing to do, but it is tempting to go with what is there to
save time. I have a bad feeling though that this could come back and
bite me!
>
Any advice is appreciated.

David W. Fenton
Guest
 
Posts: n/a
#7: Jun 14 '07

re: Spaces In Object And Field Names


"Allen Browne" <AllenBrowne@SeeSig.Invalidwrote in
news:46709d60$0$22412$5a62ac22@per-qv1-newsreader-01.iinet.net.au:
Quote:
If you are just modifying the existing database to fix problems,
renaming fields just because they contain a space would be a waste
of your time. The practical problem with the long names and spaces
is that it takes longer to type them (the long names and the
square brackets you must add each time), but if someone has
already done all that, there is no point you wasting your time
again changing them back just so that they did not have to waste
so much time in the first place.
That's only an issue if you're doing it manually. If you're doing it
with a search-and-replace tool like Speed Ferret, it's trivial.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
David W. Fenton
Guest
 
Posts: n/a
#8: Jun 14 '07

re: Spaces In Object And Field Names


Wayne <cqdigital@volcanomail.comwrote in
news:1181795803.460155.145190@i38g2000prf.googlegr oups.com:
Quote:
Thanks all for the replies. No, I am not rewriting the
application from scratch and what you say Allen, regarding
renaming the fields being a waste of time makes sense. If I leave
them as they are, not only will it save the time renaming them,
but queries that use these field names will remain intact as well.
I may well be able to use or modify many of these queries which
will save even more time.
But then you'll have the time loss and annoyance whenever you build
new objects.

Get a search-and-replace tool like Speed Ferret and this kind of
thing becomes completely trivial.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Tim Marshall
Guest
 
Posts: n/a
#9: Jun 14 '07

re: Spaces In Object And Field Names


David W. Fenton wrote:
Quote:
That's only an issue if you're doing it manually. If you're doing it
with a search-and-replace tool like Speed Ferret, it's trivial.
I use Rick Fisher's great find and replace utility (
http://www.rickworld.com/ ). Does Speed ferret check menus? That's one
area in Find & Replace that isn't searched and it can be a big PITA if
you have functions in your menu action items that use field names for
arguments. 'specially if you have tons of short cut menus...
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Be Careful, Big Bird!" - Ditto "TIM-MAY!!" - Me
Tom van Stiphout
Guest
 
Posts: n/a
#10: Jun 15 '07

re: Spaces In Object And Field Names


On Thu, 14 Jun 2007 11:53:56 -0230, Tim Marshall
<TIMMY!@PurplePandaChasers.Moertheriumwrote:

I ran this by Rick, who wrote back:
Actually if you click the search in Macros button it will search
menus. This should be mentioned in the section of the help file
titles "What Find and Replace Searches".

-Tom.


Quote:
>David W. Fenton wrote:
>
Quote:
>That's only an issue if you're doing it manually. If you're doing it
>with a search-and-replace tool like Speed Ferret, it's trivial.
>
>I use Rick Fisher's great find and replace utility (
>http://www.rickworld.com/ ). Does Speed ferret check menus? That's one
>area in Find & Replace that isn't searched and it can be a big PITA if
>you have functions in your menu action items that use field names for
>arguments. 'specially if you have tons of short cut menus...
DavidB
Guest
 
Posts: n/a
#11: Jun 15 '07

re: Spaces In Object And Field Names


On Jun 13, 7:53 pm, Wayne <cqdigi...@volcanomail.comwrote:
Quote:
I have been given the task of rewriting a database that seems as
though it has been written by someone with a very basic understanding
of Access. Many of the object names and field names in tables are
overly long and contain spaces e.g. "Next of kin phone number" instead
of something like "KinPhNo".
>
I am looking for opinions on whether I should spend considerable extra
development time and "fix" all the problem names. I know that this is
the right thing to do, but it is tempting to go with what is there to
save time. I have a bad feeling though that this could come back and
bite me!
>
Any advice is appreciated.
Get rid of space, HOWEVER don't shorten names just for the sake of
making them short. I want to be able to look at my code a year after
leaving it alone and know EXACTLY what an object is. It costs nothing
to make the names as long as needed. The abbrevations that are clear
today will almost with no doubt be obscure when viewed later. My
method is no spaces and all words proper (and singular object names)
so...


Good field names:
ContactNameLast
UserLocation
SupervisorID
AccountManagerPhone

Bad field names:
Contact name
ULoc
Super
acctmanphno

In fact when I go to hire some to code, the first thing I lok for in
their code is a good naming convention. If they uses spaces and
abbreviations in their code they go way to the bottom of the list of
candidates.

Tim Marshall
Guest
 
Posts: n/a
#12: Jun 15 '07

re: Spaces In Object And Field Names


Tom van Stiphout wrote:
Quote:
On Thu, 14 Jun 2007 11:53:56 -0230, Tim Marshall
<TIMMY!@PurplePandaChasers.Moertheriumwrote:
>
I ran this by Rick, who wrote back:
Actually if you click the search in Macros button it will search
menus. This should be mentioned in the section of the help file
titles "What Find and Replace Searches".
I just tested it and you're quite right! Plus Rick took the effort to
write to me and tell me about this - that's brilliant support, if you
ask me.

As I told Rick, I admit I haven't read the F&R help file in detail and
since I don't use macros except for autokeys, I've never bothered to
select macros in the F&R when I've used it.

I just tested it and of course it works. Actually, when I think about
it, it kind of makes sense that menus are handled with macros - whenever
a function I assign to the on action event of a macro fails, the error
message always refers to a macro.

Thanks, Tom (and Rick).
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
David W. Fenton
Guest
 
Posts: n/a
#13: Jun 15 '07

re: Spaces In Object And Field Names


Tom van Stiphout <no.spam.tom7744@cox.netwrote in
news:012473h882v460vmlvgm2ps90mglpq0mvh@4ax.com:
Quote:
I ran this by Rick, who wrote back:
Actually if you click the search in Macros button it will search
menus. This should be mentioned in the section of the help file
titles "What Find and Replace Searches".
Speed Ferret searches menus by default if you choose ALL, and lists
all your custom menus under TOOLBARS if you're choosing only certain
things to search.

I so seldom use SpeedFerret in anything other than apps written by
other people (which are never sophisticated enough to have custom
menus!) that I had never noticed that this is the case.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Closed Thread