To err is Celko, but vendor implementations may vary
April 30th, 200915
To err is Celko, but vendor implementations may vary
April 30th, 200915
 
 

While nobody can question that Joe Celko's online attitude borders on the criminal can be quite abrasive, his answers are often correct.  The problem is, while he might be well-versed in ANSI standards that were drafted before Sony invented the Walkman, he espouses misconceptions about actual vendor implementations in very particular places, such as the SQL Server newsgroups on msnews.microsoft.com.   So SQL Server users end up believing in non- or half-truths, and Celko is blissfully ignorant that he has given bad advice, simply because he doesn't have any experience with SQL Server.  (I toyed with saying, "he doesn't know any better."  I find that kind of rude and possibly misleading in and of itself, but I mention it because (a) it's funny, to me at least, and (b) I'm sure he *does* know better.)

Today he implied that SQL Server does not support foreign keys across schema, an allegation which I promptly proved wrong.  To be fair, he did not come out and say, "SQL Server does not do this," but prior to further prodding, he made a generic enough statement that several people assumed he meant SQL Server (we were in a SQL Server newsgroup, after all). The thread is no longer available in the newsgroup archive but, for posterity (and littered with [sic] like he so often does to poor users):

A scheam [sic] is suppose [sic] to be a complete data model.  If Sales, Orders and Products have a realtinship [sic] among themselves, then they have to be in the same schema for DRI to work.  This is foundations, not advanced stuff.

And here is a code sample that proves he is leading the user down the wrong path because he *thinks* he knows how SQL Server implemented those standards from so long ago.  Note that I used an additional file and filegroup to show that the physical aspect he mentioned later in the thread is not relevant either. 

USE [master];
GO
CREATE DATABASE Celko;
GO
ALTER DATABASE Celko ADD FILEGROUP fg2;
GO
ALTER DATABASE Celko ADD FILE
(
    NAME = CelkoExtraFile,
    FILENAME = 'C:\Celko2.mdf',
    SIZE = 1MB,
    MAXSIZE = 10MB,
    FILEGROWTH = 1MB
) TO FILEGROUP [fg2];
GO
 
USE Celko;
GO
CREATE SCHEMA s1 AUTHORIZATION [dbo];
GO
CREATE SCHEMA s2 AUTHORIZATION [dbo];
GO
CREATE TABLE s1.Table1
(
    s1_ID INT PRIMARY KEY
) ON [PRIMARY];
GO
CREATE TABLE s2.Table2
(
    s1_ID INT NOT NULL
    FOREIGN KEY REFERENCES s1.Table1(s1_ID)
) ON [fg2];
GO
INSERT s1.Table1(ID) SELECT 5;
GO
-- succeeds:
INSERT s2.Table2(s1_ID) SELECT 5;
GO
-- fails:
INSERT s2.Table2(s1_ID) SELECT -1;
GO
 
USE [master];
GO
DROP DATABASE Celko;
GO

And this is not the first time something like this has happened; my expectation is that, like before, he will not respond to my post where I corrected his misconception.  Though I fear that in a lot of cases, the damage is already done.

Heck, I'm wrong occasionally, and I probably guess more often than you might expect.  When responding to people requesting help, in most cases I have tested what I'm saying and in many of those cases I post sample code to prove it.  And I am hardly the luminary or "expert" that Celko is, whose word is taken at gospel just because he is accomplished, has books, etc.  So I think often his rantings are assumed accurate and people start to believe in his mindset without getting a second opinion.  After all, I haven't published any complete books on SQL, only chapters and tech edits, so what the heck could I possibly know?

By: Aaron Bertrand

I am a passionate technologist with industry experience dating back to Classic ASP and SQL Server 6.5. I am a long-time Microsoft MVP, write at Simple Talk, SQLPerformance, and MSSQLTips, and have had the honor of speaking at more conferences than I can remember. In non-tech life, I am a husband, a father of two, a huge hockey and football fan, and my pronouns are he/him.

15 Responses

  1. AaronBertrand says:

    Thanks Aaron, yes I am one of those that knows the Jeckyll and Hyde of Celko.  I had lunch with him at PASS in Grapevine a few years ago, and he was quite literally one of the nicest and most humble colleagues I have come across.  I am not sure why he is so vehement and disparaging when posting online, and frankly I'm not sure why he bothers.  But it seems like all the negative feedback in the world won't discourage him.  He is very good at ignoring both those comments and the questions / challenges that would force him to admit he's wrong.

  2. Aaron Alton says:

    Good for you, Aaron.
    IMO, there's no excuse for treating users like dirt, and especially when their only "offense" is inexperience.
    I've heard (from people that I respect enough to believe without question) that the real-life Celko is very different from the newsgroups Celko.  If this is the case, he'd be much better off sticking to authoring books and speaking at seminars – the pompous aggression that he demonstrates online does a disservice to the people he's "trying" to help, and to his reputation in general.

  3. Mike C says:

    Joe has admitted several times, in several places, that he hasn't seen a SQL Server installation since 6.5.  Anything he says that's product-specific needs to be viewed critically through a lens of implementation-ignorance.  When reading his responses I occasionally wonder if he's ever done any development *at all* in the real world?  He doesn't present himself as a "hands-on" type who can actually implement his own advice.

  4. Paul White says:

    He has become a parody of himself.  Kinda sad really.
    The struck-through text is actually even funnier, though I got the joke first time around.
    Nice to see a slightly edgy blog post once in a while…
    Paul

  5. noeldr says:

    I have had my share of interactions with "the beast" and I have to say that I am all the way with Aaron!

  6. Armando Prato says:

    Unfortunately, I tend to skip Joe's posts in newsgroups because (a) he gratuitously berates people (b) he does not appear to factor SQL architecture into his proposed solutions. I think he's an excellent theorist and has written some good SQL books but the two issues I have outlined cause me to bypass him entirely.

  7. AaronBertrand says:

    PS here is the thread, I guess you can come to your own conclusions.
    http://is.gd/vQfk

  8. AaronBertrand says:

    Yes, the original post clearly laid out that we were talking about the latter (the specific mention was a schema called Sales, containing Orders, and another one called Production, containing Products, etc.).
    Now, you are possibly correct that Joe just simply doesn't know SQL Server well enough to understand the distinction you raised.  If that is the case, then the thrust of my argument remains unchanged: why is he speaking authoritatively (and talking down to people) when he doesn't understand the subject matter?

  9. Linchi Shea says:

    Aaron;
    I'm not sure Joe and you are talking about the same thing. Schema is a loaded word. It seems to me that Joe is talking about 'schema' as in relational database schema in a general conceptual sense (but I may be wrong here as I have not read the newsgroup thread you referenced). In that context, by the very definiiton, a schema would include all the related tables and their relationships, and logically, you would not have any relational relationship (FK or otherwise) across two different schemas. On the other hand, you are talking about the 'schema' construct implemented in MS SQL Server, which is basically a namespace construct.
    Note that even in SQL Server, the term shcema has evolved and assumed different meanings over time.
    Again, I have not read the thread, and don't know whether he was actually talking about the SQL Server schema as in CREATE SCHEMA since SQL2005.

  10. AaronBertrand says:

    Thanks Phil, I adjusted, but kind of left it in, because I think it's funny and I think everyone will know I am kidding.  (And to be quite honest, I would not be surprised if some of his victims have considered filing harassment charges of some kind against him.)

  11. Brian Tkatch says:

    Joe Celko is an idiot. He is willing to hurt others (verbally) for his own pleasure.
    I let off a little steam in the past <A Href = "http://slashdot.org/~Chacham/journal/118145">here</A&gt; and <A Href = "http://slashdot.org/~Chacham/journal/122711">here</A&gt;, then i just started to ignore him and felt so much better.

  12. Phil Factor says:

    Aaron
    I am troubled by your first sentence that says that Joe's attitude 'borders on the criminal'. I'm sure that other casual readers will feel likewise. I'm sure you don't actually mean this. I suspect that you will be advised to rephrase it. If you do, please feel free to delete this comment.
    Phil

  13. TiborKaraszi says:

    Like Alex, I tend to just give up. I from time to time post corrections where he is blatantly incorrect, but such are largely ignored and he tend to instead reply to corrections where (he believe) there is room for debate…

  14. Alex Kuznetsov says:

    Aaron, I salute your and Tony's persistence, but I gave up. I think that many unmoderated communities degrade just like sqlserver.programming did – they get dominated by trolls, and interesting activities move over to other venues.
    Had there been a moderator, any decent moderator would just delete spam like what you cited without thinking twice about it.

  15. Greg Linwood says:

    I was in a bookstore two days ago & noticed two new publications I hadn't seen before – one by Celko, the other by Date. I walked out with the Date.