High-Performance Java Persistence (英語) ペーパーバック – 2016/10/12
Kindle 端末は必要ありません。無料 Kindle アプリのいずれかをダウンロードすると、スマートフォン、タブレットPCで Kindle 本をお読みいただけます。
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.
All in all, this is one of the best books I have ever read about Java and relational database systems.
The High-Performance Java Persistence book is not just another Hibernate book saying you put this annotation here and call that method there and you are done.
Vlad went all the way to explain how things work in databases and JDBC such as database connection management, response time and throughput, batch updates, caching, transaction management etc in a very detailed way.
For many of us it is a bit overwhelming to understand it in one go, so I read it multiple times and everytime I read it I gain more and more insights about how things work under-the-hood.
Vlad Mihalcea is a master of Hibernate and we all know it. He covered almost everything about JPA/Hibernate that you can imagine..in a very detailed way...with lot of code examples. Be it JPA mappings, Identifier generation strategies, relationship configurations, batch operations, fetching/projections, lazy loading, Caching etc etc you are covered.
Just because we are using ORM in our application we should not use ORM for all database operations. For some of things like reporting or very complex queries it is better to go with plain JDBC or use some SQL-focused libraries like JOOQ or MyBatis. In this book JOOQ is covered with sufficient details on how to perform complex queries, work with stored procedures etc.
To put it in one sentence: "High-Performance Java Persistence book is one single book you need to know everything about Java Persistence Layer".