Found in 5 comments on Hacker News
joker3 · 2019-10-23 · Original thread
The database course I took covered that a bit. We used https://www.amazon.com/Database-Management-Systems-Raghu-Ram.... It's not the most up-to-date text (although it was when I was in school), but it's probably still the best source for the basics of relational database theory and implementation.
ucee054 · 2013-05-20 · Original thread
I don't think this is true at all ... you use the same query irrespective of the size of the data in the tables. So the size of the datasets is irrelevant except for surfacing performance problems.

In the example you gave you shouldn't have problems if you put the right index on the table.

What really causes the opacity is either (a) the complexity of the query or (b) the guy writing the clearly doesn't know how to write declarative code, so he tries to write eg procedural code in SQL, with cursors and triggers and other horrors.

If you are in scenario (a) and you really do need to do something complex, I'd pick SQL over VB to do it in any day - the non-declarative style leads to huge code with side effects are more opportunities for bugs to creep in.

If you are in scenario (b), the guy writing the queries really needs to read this: http://www.amazon.com/Database-Management-Systems-Raghu-Rama...

Fresh book recommendations delivered straight to your inbox every Thursday.