ISBN: 9780596008949
Buy on O'Reilly
Found in 2 comments on Hacker News
Pamar · 2019-02-13 · Original thread
I am not the OP but I would suggest anyone who wants to get better at SQL to read this book:

https://www.amazon.com/Art-SQL-Stephane-Faroult/dp/059600894...

davidmathers · 2008-07-16 · Original thread
It's tricky because most database writing is about SQL and OLTP and other practical things, but studying those things without first understanding the basic concepts of set theory and predicate logic is kind of like studying C and pointers without first learning about computer hardware. If you learn about pointers first they're confusing, but if you learn about hardware first they're obvious.

Ted Codd's big idea is fairly simple: "we can store data in logical, rather than physical, structures and then use logic statements, rather than algorithms, to retrieve the data."

Wikipedia can often end being more confusing than enlightening but the "informal introduction" on this page is a place to start:

http://en.wikipedia.org/wiki/Relation_(mathematics)

Here's a page I just found about predicate/first-order logic:

http://www.rbjones.com/rbjpub/logic/log019.htm

This book by Chris Date covers a lot of basic relational database ideas, but his writing is a bit tedious:

http://www.amazon.com/dp/159059746X

After that the main mental challenge is just learning to think in sets. Joe Celko has some writings specifically about that in his various books.

After that, the best book I've seen for SQL and practical issues is The Art of SQL:

http://oreilly.com/catalog/9780596008949/

Hope that helps. There's a lot of really bad writing about relational databases out there.

Fresh book recommendations delivered straight to your inbox every Thursday.