SQL - 5 Best Books to Learn and Master SQL and Database design

The SQL (Structured Query Language) is one of the most important skills of a programmer. I would rate this skill similar to UNIX if you are a professional programmer because it doesn't matter whether you are Java, C++, or a .NET developer, you are bound to write SQL queries. Since a database is an integral part of any modern Java or Web application, Interviewer always preferred candidates with good SQL skills. Now, the big question comes, how a programmer can learn SQL? Does just knowing how to query a table is enough? If you know insert, update, delete, and select then are you a competent SQL programmer? What about indexes, query plans, triggers, views, stored procedures and other advanced SQL concepts? What about writing complex queries involving joins, subqueries, derived tables etc? Well, all those are very important to be a competent full stack developer.

I started learning SQL from my college days and I am hooked to it because of its simplicity and power. I also found writing SQL query interesting and challenging, similar to solving programming puzzles but my SQL skills doesn't improve a lot for a long time, Why? because I was satisfied with the limited knowledge of insert, update, delete and select. I knew how to join multiple tables and I thought I knew the whole SQL. Well, I was wrong and my misconception hit badly when I started working on a project involving Murex which has a huge database in Sybase with hundreds of tables, stored procedure, and other database objects.

At that time, I started learning advanced SQL, particularly Sybase and SQL Server. My quest also results in lots of good books to learn SQL, database design, normalization, and improve your SQL query skills and this article is a collection of such books.

Though I have a separate collection of database specific books e.g. books to learn SQL Server, Sybase, or Oracle, I am only sharing books to learn general SQL also known as ANSI SQL in this article. I'll write separate articles about SQL Server and Oracle books.


It doesn't matter whether you are a beginner programmer, just started your software development career or an experienced software professional with years of experience, you will find some of the books refreshing and will learn a lot in terms of SQL concepts, database design, and SQL query skills.  So, what are we waiting for? let's start with this list.


1) Head First SQL
This is the best book for any SQL beginners. I like the Head first style for their innovative of teaching with diagrams, fireside chats, puzzles, explanation and highlight most important concepts. I have been recommending this book to beginner programmers from years and they always thank me for that. You can use this book for theory, example, and understanding fundamental concepts of SQL e.g. Joins, Subqueries, Normalization, and a little bit of database design.

The Best book to learn SQL




2) SQL Puzzles and Answers by Joe Celko
I didn't know about this book until last year, but even since I come to know about it I just fall in love. It's a great book to improve your SQL query skill. I always like to solve SQL query based problems because they are also great exercise for your mind and this book is full of such problems. The book is really advanced and some of the problems  are tough even for seasoned SQL programmers. Even though you will solve the problem, good chance is that you will also learn a new way to solve the same problem by reading explanations. In short, one of the best SQL book for experienced programmers who want to improve their SQL query skill.

Good book to learn SQL Queries




3) SQL Performance explained by Markus Winand
If I say that whatever I know about SQL indexes is due to this book then it won't be wrong. I had a lot of misconception about database indices and didn't know that how their order can affect performance. I didn't even know that how index work in SQL in detail until to learn how indexing work and how it affect query performance. This is a great book from Markus Winand and I thank him a lot for explaining such an important topic into great detail. One of the must read SQL book for every programmer.

Best book to learn SQL index and performance



4) SQL Antipatterns
In order to be successful, it's not just important to do the right things but it also important to avoid the mistakes which can hamper your success. This universal truth is also applicable in SQL. It's just not enough to know all the best practices in the SQL world and keep repeating silly mistakes like using SELECT * query or having duplicate columns. This book will help you to avoid the common mistake every SQL developer make. If you don't know about SQL mistakes, it's also a good book to learn about them. Again, one of the must read SQL books for programmers who are serious to improve their SQL and database design skills.

Best book to learn SQL design and schema



5) Beginning SQL queries
This is another beginner books, probably for the absolute beginner who doesn't know how to write SQL queries. AS title suggests this book will help you not only to write SQL queries, but also to write correct SQL queries and help you to become a professional SQL developer. Not a must read, but good SQL books for beginners.

Beginners book to learn SQL queries


That's all in this list about 5 great books to learn and master SQL. To be honest, it's easy to learn SQL but it's very difficult to master it, that's why the last two books SQL Performance Explained and SQL Anti-Patterns are very important for both SQL developer and Java/C# developers who deal with databases and SQL.


Other Book recommendations for Programmers
  • 10 Algorithm books for Programmers and Software engineers (see here)
  • 5 Books to improve your Coding Skill (see here)
  • 10 Books Every Programmer should Read (see here)
  • 5 Books to learn Java 8 and Functional Programming (see here)
  • 5 Books to prepare Programming/Coding Interviews (see here)
  • 5 Books to learn Concurrent programming and multi-threading (see here)
  • 6 Books to learn Hibernate framework for Java developers (see here)
  • 5 Books to learn Spring framework for Java developers (see here)


References
The SQL (Structured Query Language)


No comments:

Post a Comment