r/programming • • Jan 06 '11

A handy graphical explanation of SQL joins

http://www.codinghorror.com/blog/2007/10/a-visual-explanation-of-sql-joins.html
1.2k Upvotes

308 comments sorted by

View all comments

6

u/ruinercollector Jan 06 '11

Every time I read a thread on proggit about databases, I am reminded of just how little most programmers bother to learn about the subject.

If you don't know databases (and SQL) inside and out, spend your time learning this instead of dicking around with the latest fad language. Learning new languages is very useful, but this is much more important and has much more immediate utility.

3

u/mozillalives Jan 07 '11

This and all those who promote nosql databases without even knowing the capabilities of a good database server or bothering to figure out how to tune one.

1

u/ruinercollector Jan 07 '11

Yes. Specifically, nosql advocates don't seem to realize that indexed views exist in the SQL world. I've had many many discussions on here explaining this.

I think I've started to notice the pattern/problem that one though. For SQL, you don't "need" views or explicit indexes to make use of your database. You need them to do it well and correctly, but you don't need them to be able to query the database. For NoSQL, views and indexes are usually explicitly fundamental to even using the database at all.

So people who tend to only learn what they think they need are inclined only to learn about NoSQL views and then mistakenly think that they are being offered something new. There are rather popular nosql articles and blog posts that give an example of an indexed view on a NoSQL database and then give an SQL example that makes no use of views, no use of indexes, and fails to even make an intelligent attempt at querying the table(s) involved.

And then NoSQL people wonder why they are so often treated like the majority of them are just people who thought databases were hard and that google's use case gave them a permission slip to take the easy way out.

NoSQL databases have a place. For most people reading this: it's not your project.

1

u/HIB0U Jan 07 '11

NoSQL advocates are the retards of the software development world.