Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah those examples aren't really fixing the problem I was referring to, if anything they're making it worse.

What I was referring to is that 'SELECT * FROM A JOIN B ON f(A) = g(B)' and 'SELECT * FROM B JOIN A ON f(A) = g(B)' mean exactly the same thing, but this is not obvious from the language. This is especially iffy when you start joining even more tables together.

The equivalence is clear when you write out the corresponding diagram and note that the join is its limit, but your examples seem to make the same mistake SQL did by lumping together the join condition with one of the two tables.



Does it seem clear to you that a + b is equivalent to b + a? If you know the semantics of join operations (as you should to at least a basic degree if you're going to use them), the SQL notation above is just as clear as the arithmetic notation for addition.


To me the SQL notation is about as clear as a < b being equivalent to b < a.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: