Persistence in the Enterprise is currently the best book out there for a Java developer to learn and also to compare the various persistence frameworks before commiting to any one of them blindly. The best aspects of this book are the clear explanations, working examples and great teaching style.
This book is mainly divided into two parts:
Part 1, "A Question of Persistence", helps the reader understand the many issues and trade-offs we normally face while choosing a persistence framework. This part has 4 chapters that cover the following:
Chapter 1 - A brief history of Object-Relational Mapping. This gives a brief history lesson of some popular relational database persistence mechanisms associated with a few object-oriented languages.
Chapter 2 - High Level Requirements and Persistence. As the name itself suggests, this chapter discusses IT requirements around your persistence framework that you should consider.
Chapter 3 - Designing Persistent Object Services. This chapter introduces the reader to some fundamentals and best practices of domain modeling. Also discusses some common strategies of mapping a domain model to a database with an example-driven approach.
Chapter 4 - Evaluating your Options. This chapter takes you through some best practices for conducting an evaluation based on an objective questionnaire, which is used as a template for comparison in part 2. The questionnaire is very comprehensive, and covers the following sections:
2 is finished with Chapter 10 which gives a summary that compares the
mechanisms side by side and goes through a few scenarios in which one
or the other best applies.
Appendix - Setting Up the Common Example. This section shows you how to set up and run the example for each persistence framework discussed. It has almost 30 pages, and has every detail and screen shots to get the examples working using Apache Derby as the database, Eclipse as the IDE, and JUnit and DbUnit as the testing frameworks.
Each and every chapter has a summary section, links to developerworks, and references which are really valuable.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)