Quote:
quote:Originally posted by planoie
Jeff,
I must have a bug in my installation of SQL server then. I added a new column onto a table on a test database, turned on its identity property, saved the table, then opened it up again, and low-and-behold, there were values.
|
You are correct. My bad. Adding an identity column will indeed populate the column with a generated identity value when the ALTER TABLE command is executed.
I made a mistake.
No need for your sarcasm concerning your installation 'bug', though.
Quote:
quote:
And on the topic of a RecordID column, how is that "imposing some sort of physical ordering on the data"? Doesn't seem to me that a RecordID column is any more or less imposing than a UserID column or any other kind of ID column.
|
Something like a UserID presumably is an attribute of the entity being modeled by the row.
The question in this case is on what basis is that identity value assigned? It will be in whatever order the query processor decides to return the rows. I can easily demonstrate that two tables with identical rows will result in the assignment of different values for the identity column when it is added (construct one table as a heap and the other with a clustered index on some column, for example). So if I have two identically designed tables with otherwise identical data in them, yet after the creation of another column with the identity attribute in them they differ by the identity value assigned based
not on the data in those tables but on some external attribute derived from some aspect of the physical database implementation, please tell me how is that relational?
Perhaps you should study up on the concept of a
set.
Quote:
quote:
Just answer the guy's question. If he wants to hear a personal diatribe on database technique, I'm sure he'll ask.
|
Some questions are best not answered right away, until the underlying reasons for asking them in the first place are discerned. The underlying reasons may be based on faulty assumptions - like trying to assign a record number in a relational system where the concept of "record" doesn't even apply.
I fail to see how such observations can be considered a "diatribe". And I'll respond with my opinion however I think it will help, whether you approve of it or not.
Have a nice day.
Jeff Mason
Custom Apps, Inc.
www.custom-apps.com