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