Introduction

Just a quick post on useful SQL books. I’ve read several SQL books. I revisit them from time to time depending on the projects I am working on. I find that SQL is something that I can easily forget. Mainly because I don’t use it every day and I find it difficult to context switch between procedural languages and the “Relational Algebra”.

Procedural Languages (C, Python, Rust, etc) are very powerful, “Relational Algebra” Languages (SQL) are also very powerful.

One is not better than than the other.

SQL Book Recommendations

Here are the books that I come back to when I need to refresh on SQL and Relational Algebra operations and capabilities.

Head First SQL

Title: Head First SQL
Author: Lynn Beighley
Link: https://www.oreilly.com/library/view/head-first-sql/9780596526849/

If you are just starting your SQL journey this is a very good place to being. Lots of exercises and examples are presented here. It is very easy to read. I go back through this book from time to time when I haven’t been working in SQL recently.

Transact-SQL Cookbook

Title: Transact-SQL Cookbook: Help for Database Programmers
Author: Ales Spetic, Jonathan Gennick
Link: https://www.oreilly.com/library/view/transact-sql-cookbook/1565927567

If you ever need to get something done in SQL and don’t think it can be done in SQL, this is the book to turn to. It will help provide some perspective on the range of problems that can be overcome with SQL. This book helps realize that doing procedural things in database is possible, but it does require thinking about the problem in a different way.

SQL and Relational Theory: How to write accurate SQL code

Title: SQL and Relational Theory: How to write accurate SQL code
Author: C.J. Date
Link: https://www.oreilly.com/library/view/sql-and-relational/9781491941164/

This is the ultimate reference book for Relational Theory and SQL. This book is thick, detailed and fortunately there is a little dry humor scattered about. If you really need to dig in and understand how a relational database works and why it works. This is the book to read… eventually. Don’t try to read it all at once.

Conclusion

You might notice that all of these books are published by O’Reilly. For a long time I considered O’Reilly the best publisher for relevant software development related books. Since they have moved to a different model, I no longer see them with such high regard.

Please consider buying these physical books so that the authors will receive some compensation for them. Please don’t steal them.