You are here: Re: Getting list of recently added IDENTITY items « MsSQL Server « IT news, forums, messages
Re: Getting list of recently added IDENTITY items

Posted by Erland Sommarskog on 03/12/06 12:47

David Portas (REMOVE_BEFORE_REPLYING_dportas@acm.org) writes:
> Users are concerned with information. Data (how the information is
> represented) is primarily the concern of database professionals. As a
> database designer you have a choice because the same information can
> always be modelled with natural keys or without. You can argue that the
> developer may lack the time, the resources or the authority to redesign
> his database. He may even be unable to analyse his business problem
> well enough to identify a suitable key with a high degree of
> confidence. However, those constraints are not problems we can solve in
> a newsgroup. They are project management problems rather than technical
> ones.

Thus, it is not the right thing to say in a newsgroup that you should
not use IDENTITY. Maybe it was a poor database design. Maybe there were
time constraints in the project. Whatever, it's not our business.

> The technical solution to the OP's problem is simple: elminate
> redundancy. It is always possible to eliminate redundancy as a
> consequence of the simple fact that duplicate rows cannot contain more
> information than a single row. That applies equally whether the row
> represents customers or books or anything else. I suggest we let the OP
> to decide if he has the will or the resources to implement the solution
> in his case.

Say that you are importing a file from some less good source. The file may
contain lines that are true duplicates. Still we way want to import that
file in whole, if nothing else because we think SQL is the best tool to
find the duplicates. You still need some way to identify the lines. This
can be achieved in several ways, whereof IDENTITY is one.


--
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

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