Re: add a column specified location in Table..
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Tue, 21 Mar 2006 08:48:55 +0000 (UTC)
Anith Sen (anith@xxxxxxxxxxxxxxxxxxxx) 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@xxxxxxxxxxxxx
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
.
- Follow-Ups:
- Re: add a column specified location in Table..
- From: David Portas
- Re: add a column specified location in Table..
- References:
- add a column specified location in Table..
- From: surya
- Re: add a column specified location in Table..
- From: Jens
- Re: add a column specified location in Table..
- From: Erland Sommarskog
- Re: add a column specified location in Table..
- From: Anith Sen
- add a column specified location in Table..
- Prev by Date: Re: Query Problem
- Next by Date: Re: add a column specified location in Table..
- Previous by thread: Re: add a column specified location in Table..
- Next by thread: Re: add a column specified location in Table..
- Index(es):
Relevant Pages
|