Jump to content
Server Maintenance This Week. ×

same-named fields in different tables


This topic is 6587 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I realize that same-named fields (e.g., "NameFirst") in different (related) tables have their own context. Does giving them different names, like "NameFirstEmployee" and "NameFirstVendorContact" have much value to developers (an extra, but not necessary identifier as to which field/table is being referred to)? I'm thinking the overhead of the extra length might not be worth it, but I'm not sure. Thanks.

Bob

Link to comment
Share on other sites

Not really no. Unless both fields are in the same table. In the case that they are, yes but watch the length of your field names.

Otherwise, your probably shouldn't worry about it. I.e. if your NameFirst field is in a table called employee, its purpose should be obvious.

~Genx

Link to comment
Share on other sites

Not in my opinion. Especially if the table name implies the context. If you have a Vendors table and an Employees table, then Vendors::VendorName and Employees::EmployeeName is somewhat redundant. I try to keep my field names as short as possible as long as they are not ambiguous. You can also use the comment field in the field definitions for better documentation.

Link to comment
Share on other sites

This topic is 6587 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.