Forgot your password?
typodupeerror
This discussion has been archived. No new comments can be posted.

Nonsense: SQL 2003 Cruel and Unsual punishment.

Comments Filter:
  • How the heck do you ever find anything without a primary key?
    • by Chacham (981)
      There's a difference between declaring a PK and having something that could be a PK.

      Anyway, in logs, for example, there doesn't have to be a PK.
      • True enough- neither in SQL Server, which I personally consider a real problem with logs. Would it really kill you to index the time stamp?

        However, what I was surprised at was that in the realm of DB2 programmers, PK was an unheard of concept (though it sure would explain some of the database designs I've seen come out of people previously trained in DB2).
        • by Chacham (981)
          Heh.

          Worse. In SQL Server many people just use Clustered Indexes instead of a real PK.
          • That is EXACTLY what I keep running into. I keep having to explain the difference between Logical Primary Keys and Physical Primary Keys, and why the first should be indexed and the second should always be present even if it's just a 32-bit identity field.

            Clustered multiple field keys may have a logical reason for existing, but they are NOT very efficient and they make it very hard to have a foreign key relationship with the table (because you have to have *every* field in the primary key).

There is nothing so easy but that it becomes difficult when you do it reluctantly. -- Publius Terentius Afer (Terence)

Working...