The computer science turing test

14 April, 2008

I fundamentally don’t understand SQL JOIN clauses.

That’s not to say I can’t read and parse them, I just don’t understand them well enough to be able to write them and be confident of exactly what’s happening. In my brain, this means I fail some kind of test. I think that being able to naturally understand and write JOIN clauses is probably what marks you out as a Computer Scientist, instead of some pretender like me.

Perhaps JOINs are some form of Computer Science Turing test? Although whether being able to write JOINs means you pass or fail the test I’ll leave up to you.

See other posts tagged with general sql and other posts made in April 2008.


Devdas Bhagat
14 April, 2008 at 19:20

SQL JOINs are just a way of combining two sets.

I suggest starting off with understanding the natural join, and then follow up with the rest.

I also recommend reading up on CJ Date, and EF Codd’s works.

14 April, 2008 at 22:58

Yeah, I understand perfectly how they work and what they do, I just don’t have a built-in parser like I do for most other things. Consider it a sort of blind spot 🙂

14 April, 2008 at 23:09

You obviously need to do more hardcore logic programming 🙂 . If you get to the point where you read your own prolog after a week, plain old boring propositional SQL seems like a breeze.

14 April, 2008 at 23:43

Wow, it has been a long, long time since I’ve had to write any prolog! I’m glad to say that I can only summon vaguely positive memories.

Luke Maciak
15 April, 2008 at 16:02

I was like that too. And then I ended up working on a database-centric application which required me to write so many SQL JOIN statements that at one point the built in mental parser just clicked in. 🙂

15 April, 2008 at 22:15

I think ORM tools may have corrupted me forever 🙂

16 April, 2008 at 22:19

I have to admit I still find it easier to parse the old-fashioned (some might say Oracle-style) of joins, rather than the explicit syntax.

e.g. SELECT * FROM table1 a,table2 b WHERE a.field=b.field

But I appreciate that writing that kind of thing is, these days, on a par with farting at the in-laws dinner table.