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. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|