Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

×
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).

Any program which runs right is obsolete.

Working...