|
Posted by Martijn Tonies on 07/30/06 22:02
> I do know all this of course, I was just surprised by the difference in
> behavior between MS Sqlserver and other database, which return the
> table name as part of the name.
>
> I have read quite a lot on the subject and some people claim that a
> colum name should be UNIQUE in a database, i.e. rather than having
>
> table1.column
> table2.column
>
> the design should be
>
> table1.colum1
> table2.colum2
>
> This would solve ANY ambiguity as to colum names especially in joins.
>
> What is your opinion on that?
>
> P.S. Classis DB / SQL literature does not mention this as a
> prerequisite for proper DB design.
Name the columns as they make sense.
Now, for a proper _resultset_ -- name the columns accordingly.
eg:
select table1.column as table1_column,
table2.column as table2_column
from ... join ... etc. etc ...
Problem solved.
--
Martijn Tonies
Database Workbench - development tool for MS SQL, and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
Navigation:
[Reply to this message]
|