A high-performance data access layer must resonate with the underlying database system. Knowing the inner workings of a relational database and the data access frameworks in use can make the difference between a high-performance enterprise application and one that barely crawls.This book is a journey into Java data access performance tuning. From connection management, to batch updates, fetch sizes and concurrency control mechanisms, it unravels the inner workings of the most common Java data access frameworks.The first part aims to reduce the gap between application developers and database administrators. For this reason, it covers both JDBC and the database fundamentals that are of paramount importance when reducing transaction response times. In this first part, you'll learn about connection management, batch updates, statement caching, result set fetching and database transactions.The second part demonstrates how you can take advantage of JPA and Hibernate without compromising application performance. In this second part, you'll learn about the most efficient Hibernate mappings (basic types, associations, inheritance), fetching best practices, caching and concurrency control mechanisms.The third part is dedicated to jOOQ and its powerful type-safe querying capabilities, like window functions, common table expressions, upsert, stored procedures and database functions.
The first part about JDBC is worth 5 stars, no denying! Second part about Hibernate and JPA was a little bit boring. I was missing performance comparisons and I was overwhelmed by "generated" SQL queries. This part, among being the largest one, is more like reference documentation, but still worth reading, so 4 stars. Last chapter is about JOOQ and although I like this library, I wouldn't miss it if it was omitted. Overall - very good book!
I like reading so I purchased his book as a way how to pay for it.
A good book for senior developers or architects. It is difficult to absorb all his knowledge. Definitely, I will re-read some chapters when needed. He explains jdbc concept and the differences between particular SQL engines. It is a pity that benchmarks are anonymized.
* Describes a lot of pitfalls * Has references to * Has a lot of SQL and describes specifics of different databases * Has many histograms with performance comparisons * Is fresh (2020)
In summary, it leaves a feeling of deep research while staying practical.
First part about JDBC very good, for sure would come back to it. Part about Hibernate less interesting, still worth reading, but can be used as a reference rather than advice how to solve particular problems.
I have worked with Hibernate for 7 years but everything Vlad Mihalcea introduce are amazing. I have watched uncountable his post, article, videos, and this book is one of the best. It absolutely must read if you are using JPA/Hibernate.
The book is very valuable and contains a lot of knowledge. It's a must-read for everyone interested in the topic in title (JDBC, JPA - Hibernate, but also database concepts like transactions). I don't think it's timeless, since it's quite technology-centered, but I don't think this is a disadvantage. It's to be expected from a book like this one. I'm subtracting one star because of a slightly chaotic approach every now and then. It's subtle, but I think may lead to some confusions. Here's an example: in "Transactions" chapter, "Concurrency control" section is divided into two subsections: "Two-phase locking" and "MVCC". This may be a bit misleading, because even though they indeed are antagonistic (pessimistic vs optimistic), their goal is very much different. The former allows for snapshot isolation, the latter - serializability. It would probably be better to compare 2PL and SSI (which is the default serializability implementation in postgres).
This book is a must read if you are developing data access layer for relational databases using Java. Extremely detailed, good explanations, amazing code samples. Explores several possibilities of the most famous APIs to interact with relational databases. I would recommend a first full reading without practicing the examples just to have an understanding of all possibilities of the mentioned technologies. After that, use the book to practice the main areas of your interest.