Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Naming Fields

Status
Not open for further replies.

eogd

Technical User
Jun 20, 2001
2
GB
I am modifying a database with @ 50 tables, many of the tables contain a field called ProdID (product ID) a long interger field used in a many to one relationship with ProdID a key field in the product table.
Is it good practice to have a field with the same name in several tables?

 
I guess it depends on your preference. I prefer to use the same name throughout the database on all tables and queries as long as the name refers to the same entity. That does cause some minor inconvenience when selecting columns from joined tables. I'm sure others will weigh in with differing opinions. Terry

"I'm not dumb. I just have a command of throughly useless information." - Calvin, of Calvin and Hobbes
 
I agree w/ Terry. As long as the data element is the SAME, I use the same 'Field Name'. In queries, I prefix te field name with a table identifier to alais the name, so there is no real confusion as to where the actual value came from.


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
I have to jump in the boat with Michael and Terry as well. The names being kept the same makes it much easier for me the programmer to keep it straight. What a cozy little cruise we got going here, eh?

$0.02 Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top