The computer science turing test
14 April, 2008I 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.
Comments
Devdas Bhagat
14 April, 2008 at 19:20
Phil
14 April, 2008 at 22:58
Owen
14 April, 2008 at 23:09
Phil
14 April, 2008 at 23:43
Luke Maciak
15 April, 2008 at 16:02
Phil
15 April, 2008 at 22:15
Ciaran
16 April, 2008 at 22:19
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.
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 🙂
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.
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.
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. 🙂
I think ORM tools may have corrupted me forever 🙂
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.