You are here: Re: add a column specified location in Table.. « MsSQL Server « IT news, forums, messages
Re: add a column specified location in Table..

Posted by Erland Sommarskog on 03/21/06 10:48

Anith Sen (anith@bizdatasolutions.com) writes:
>>> How do you know that?
>
> Anyone with familiarity with data management fundamentals would know for
> a fact that assigning positional significance to columns in a relational
> table is wasteful.

Sorry, Anith, but that is just a piece of crap. Developing database systems
is more than just relational theory. It's a about common software-
engineering principles as well.

For the SQL operations as such the order has no importance, but from that
saying that it's wasteful to care about order, is plainly ignorant.

>>> I try arrange columns in a logical order, so that it's easier to read
>>> the database documentation, so it's easier to view data with "SELECT
>>> *", which we use a lot when looking at data from Query Analyzer.
>
> It is the tail wagging the dog. Your documentation should follow the
> schema, not the other way around. If you have poor documentation
> practices, consider rectifying it by using better source code
> configuration/ management protocols. "Easy to read the doc" is not
> really a reason to add something that can be superfluous.

This was the most stupid I've read in a long time. I can document the
columns in any order I like. In fact documentation and tables come from
the same source - the data-modellling tool. And, yeah, the data-modelling
tool permits me to insert columns in any place. Maybe you should sue Sybase
for permitting me to do that.

> Not sure if many had found it missing, but as for a DDL at the logical
> level it is as simple as shortcut that transparently drops & recreates
> the table. There are considerable physical model implications with
> changing column order, esp. if there are clustered indexes on the
> columns that are affected by the change. Even if it is a heap, any
> underlying implementations of constraints, defaults or rule would have
> to be bound differently if the columns changed are somehow affected by
> them.

First you said that column does not matter, because we address columns
by name and position, and now you says it matters a whole because there
may be a poor implementation?

What it is all about at the end of the day, is that I want my developers
to read the documentation for a table in order that is logical for how
the table looks today, not for how the table looked ten years ago, and
all columns added since then.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация