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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Include tablename in fieldname



 
 
Thread Tools Display Modes
  #11  
Old April 22nd, 2010, 12:20 AM posted to microsoft.public.access
Mark Andrews[_4_]
external usenet poster
 
Posts: 169
Default Include tablename in fieldname

IMHO:
I prefer to sometimes use the tablename in fieldnames.
Example I might have a table that is used a lot like tblContact and
I have fields "Firstname" and "LastName"

In a second table tblEmployee (which only holds the 20 employees) I might
call fields
"EmployeeLastName" and "EmployeeFirstName"

It just makes a few things easier (not getting duplicate names and having to
tack the table name on all the time)
Also it keeps the fields "LastName" and "FirstName" shorter (I use them a
lot). So in general I try to not have too many fields
with the same name.

I also use singular names for everything (so I don't need to remember is it
singular or plural)

I don't use short abbreviations very much (usually spell things out etc...).

For Primary keys I always use "ContactID" or "EmployeeID" and keep the same
names
for foreign keys in other tables.

I never use spaces.

However back when I did Datawarehouse design I used the tablename in every
field.
Followed Ralph Kimball's data warehouse techniques.
ContactID
ContactFirstName
ContactLastName

No two fields in the entire database had the same name.

Now I just do it how I like it.

My two cents,

--
Mark Andrews
RPT Software
http://www.rptsoftware.com
http://www.donationmanagementsoftware.com

"Lars Brownies" wrote in message
...
What's the general concensus about including the tablename in every field
name, like:

tblCustomer
ID_Customer
Lastname_Customer
etc.

Is it necessary? Should it be prefix or postfix?
Thanks,

Lars


  #12  
Old April 22nd, 2010, 04:54 PM posted to microsoft.public.access
Lars Brownies[_2_]
external usenet poster
 
Posts: 157
Default Include tablename in fieldname

Thanks for the addition.

Lars

"Mark Andrews" schreef in bericht
...
IMHO:
I prefer to sometimes use the tablename in fieldnames.
Example I might have a table that is used a lot like tblContact and
I have fields "Firstname" and "LastName"

In a second table tblEmployee (which only holds the 20 employees) I might
call fields
"EmployeeLastName" and "EmployeeFirstName"

It just makes a few things easier (not getting duplicate names and having
to tack the table name on all the time)
Also it keeps the fields "LastName" and "FirstName" shorter (I use them a
lot). So in general I try to not have too many fields
with the same name.

I also use singular names for everything (so I don't need to remember is
it singular or plural)

I don't use short abbreviations very much (usually spell things out
etc...).

For Primary keys I always use "ContactID" or "EmployeeID" and keep the
same names
for foreign keys in other tables.

I never use spaces.

However back when I did Datawarehouse design I used the tablename in every
field.
Followed Ralph Kimball's data warehouse techniques.
ContactID
ContactFirstName
ContactLastName

No two fields in the entire database had the same name.

Now I just do it how I like it.

My two cents,

--
Mark Andrews
RPT Software
http://www.rptsoftware.com
http://www.donationmanagementsoftware.com

"Lars Brownies" wrote in message
...
What's the general concensus about including the tablename in every field
name, like:

tblCustomer
ID_Customer
Lastname_Customer
etc.

Is it necessary? Should it be prefix or postfix?
Thanks,

Lars


 




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 01:26 PM.


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