Re: add a column specified location in Table..



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
.



Relevant Pages

  • Re: detaching db and stopping services
    ... IMO, it doesn't matter what anyone of us say. ... matter is what the documentation say. ... Tibor Karaszi, SQL Server MVP ... >> When you detach a database, a checkpoint happens in the database. ...
    (microsoft.public.sqlserver.server)
  • Re: HOWTO Install MSDE 2000 silently and completely?
    ... i also facing the same problem + one extra problem ... my sql server service stops after a few moments after the start.. ... > documentation does not specify how a program using ... Goto Start Services. ...
    (microsoft.public.sqlserver.msde)
  • Re: Mobile Solution with SQL Server 2005 Express edition and smartphone
    ... While the documentation is incomplete, ... Hitchhiker's Guide to Visual Studio and SQL Server ... Are 'Sync Services for ADO.net' already available for Windows Mobile? ...
    (microsoft.public.sqlserver.ce)
  • Re: Problems searching xml data using FTS
    ... > John, you have indicated in your post below that searching can be done the ... > explain to me how this can be acheived in SQL Server 2000 or point me to ... > documentation for this? ... >> of how the FT Index (internal to the MSSearch maintained FT Catalog) is ...
    (microsoft.public.sqlserver.fulltext)