Re: Field naming: Same name represents different data

From: - g r e g - <>
Date: Mon, 24 Feb 2003 11:12:16 -0800
Message-ID: <>

Sure, I think that users understand the difference here, but that it would be bad practice because there exist other options that are less confusing. Instead of calling them all AGE, Why not call the domains EmpAge, AccRcvAge, CheeseAge? In my experience, clarity is much more valuable than typing time. Its not illegal, and its not wrong, but database programming can be diffcult enough. When you plan out your scope and schema for a DB, would you ever plan to have different tables have the same variable names for non-key/foreign key domains? There may be reasons for naming as described, but generally its easier to work with a system with unique names, as in when doing a complex join or creating a UML diagram.
Please let me know your thoughts.
Thanks, Greg

Bob Badour wrote:

> Why would it be bad practice to use the user's preferred terminology? Users
> understand that the age of an employee is different from the age of a
> receivable is different from the age of a block of cheese. Don't they?
> "- g r e g -" <> wrote in message

>>While not great practice (I'd be frustrated) I don't know of any rule
>>that says that it cannot be done. There may be an internal procedure
>>at your office/site that precludes one from creating in one database
>>two different 'meanings' for the same named domain. But, off the top
>>of my head, if you run a cheese ordering buisiness, you might have a
>>database where the domain named AGE in one table contains the value of
>>a cheese-maker's age code, while another table flags boolean values
>>for a past due bill into the domain AGE. Yeah, its silly and surely a
>>bad practice, but not against the rules, I believe.
>>Lee C. wrote:
>>>I am still fairly new to database design and analysis. I have just
>>>come across a database that frequently uses the same field name to
>>>represent different data (data that would be from different domains).
>>>When tablename.fieldname is considered, of course, the names are
>>>unique. I thought there was a general rule about this, but cannot
>>>find any relevant information. Can someone please point me directly
>>>to an online source that will help me to understand this?
> Received on Mon Feb 24 2003 - 20:12:16 CET

Original text of this message