Chapter 1. Understanding object/relational persistence
Figure 1.1. A simple UML diagram of the User and BillingDetails entities
Figure 1.2. The User has an Address.
Figure 1.3. Using inheritance for different billing strategies
Chapter 3. Domain models and metadata
Figure 3.1. A persistence layer is the basis in a layered architecture.
Figure 3.2. A class diagram of a typical online auction model
Figure 3.3. Persistent classes of the CaveatEmptor domain model and their relationships
Chapter 4. Mapping persistent classes
Figure 4.1. Two User instances have a reference to a single Address.
Figure 4.2. Two User instances each have their own dependent Address.
Figure 4.3. Diagramming stereotypes for entities and value types
Chapter 5. Mapping value types
Figure 5.1. Composition of User and Address
Figure 5.2. The columns of the components are embedded in the entity table.
Figure 5.3. Nested composition of Address and City
Figure 5.4. Embedded columns hold Address and City details.
Figure 5.5. The abstract Zipcode class has two concrete subclasses.
Chapter 6. Mapping inheritance
Figure 6.1. Mapping all concrete classes to an independent table
Figure 6.2. Mapping an entire class hierarchy to a single table
Figure 6.3. Mapping all classes of the hierarchy to their own table
Figure 6.4. Breaking out a subclass to its own secondary table
Figure 6.5. Mapping concrete embeddable classes with their inherited properties
Figure 6.6. A user has either a credit card or a bank account as the default billing details.
Chapter 7. Mapping collections and entity associations
Figure 7.1. The IMAGE table holds image filenames, each referencing an ITEM_ID.
Figure 7.2. Table structure and example data for a set of strings
Figure 7.3. Surrogate primary key column for a bag of strings
Figure 7.4. The collection table preserves the position of each list element.
Figure 7.5. Tables for a map, using strings as indexes and elements
Figure 7.6. Collection of Image components in Item
Figure 7.7. Example data tables for a collection of components
Figure 7.8. Collection of components table with a surrogate primary key column
Figure 7.9. Database tables for a map of components
Figure 7.10. The Item has a Map keyed by Filename.
Figure 7.11. Database tables for a Map of Images keyed on Filenames
Figure 7.12. USER_ID has a foreign key constraint referencing USERS.
Figure 7.13. Relationship between Item and Bid
Figure 7.14. A many-to-one relationship in the SQL schema
Figure 7.15. Bidirectional association between Item and Bid
Figure 7.16. Bidirectional associations between Item, Bid, and User
Chapter 8. Advanced entity association mappings
Figure 8.1. Address as an entity with two associations, supporting shared references
Figure 8.2. The USERS table has a foreign key constraint on its primary key.
Figure 8.3. The ADDRESS table has a foreign key constraint on its primary key.
Figure 8.4. A one-to-one join column association between the USERS and ADDRESS tables
Figure 8.5. A Shipment has an optional link with an auction Item.
Figure 8.6. The intermediate table links items and shipments.
Figure 8.8. The User-Item “bought” relationship
Figure 8.9. An intermediate table links users and items.
Figure 8.10. The one-to-may relationship from Address to Shipment
Figure 8.11. A primary key in the USERS table links the USERS and SHIPMENT tables
Figure 8.13. A many-to-many association between Category and Item
Figure 8.14. A many-to-many relationship with a link table
Figure 8.15. CategorizedItem is the link between Category and Item.
Figure 8.16. Additional columns on the join table in a many-to-many relationship
Figure 8.17. A link table with three foreign key columns
Figure 8.18. A Map with entity associations as key/value pairs
Figure 8.19. The link table represents the Map key/value pairs.
Chapter 9. Complex and legacy schemas
Figure 9.1. The USERS table has a composite primary key.
Figure 9.2. Part of the USERS composite primary key is also a foreign key.
Figure 9.3. The item’s seller is represented with a composite foreign key in the ITEM table.
Figure 9.4. The item’s seller foreign key references a non-primary column in USERS
Figure 9.5. Breaking out the billing address data into a secondary table
Chapter 10. Managing data
Figure 10.1. Entity instance states and their transitions
Figure 10.2. Making an instance persistent in a unit of work
Figure 10.3. Making an instance persistent in a unit of work
Chapter 11. Transactions and concurrency
Figure 11.1. Lost update: two transactions update the same data without isolation.
Figure 11.2. Dirty read: transaction A reads uncommitted data from transaction B.
Figure 11.3. Unrepeatable read: transaction A executes two non-repeatable reads.
Figure 11.4. Last commit wins: transaction B overwrites changes made by A.
Figure 11.5. Phantom read: transaction A reads new data in the second SELECT.
Chapter 12. Fetch plans, strategies, and profiles
Figure 12.1. The persistence context contains an Item proxy.
Figure 12.2. Proxies and collection wrappers represent the boundary of the loaded graph.
Figure 12.3. The seller and the bids of an Item are loaded.
Figure 12.4. Hibernate joins two tables to eagerly fetch associated rows.
Figure 12.5. A product is the result of two joins with many rows.
Chapter 13. Filtering data
Figure 13.1. Audit logging tables for the Item and User entities
Chapter 15. The query languages
Figure 15.2. The result of an ANSI-style inner join of two tables
Figure 15.3. The result of an ANSI-style left outer join of two tables
Figure 15.4. The result of an ANSI-style right outer join of two tables
Chapter 17. Customizing SQL
Figure 17.1. The Category has a self-referencing many-to-one association.
Figure 17.2. Database table and sample data for a tree of categories
Chapter 18. Designing client/server applications
Figure 18.1. Generic DAO interfaces support arbitrary implementations.
Figure 18.2. This conversation is a unit of work from a user’s perspective.
Figure 18.3. The calls in the “Edit an auction item” conversation
Figure 18.4. A user placing a bid: a unit of work from the user’s perspective
Figure 18.5. The calls in the “Placing a bid” conversation
Figure 18.6. The client retrieves data already transformed for immediate display.
Figure 18.7. The client controls the conversation boundaries on the server.
Chapter 19. Building web applications
Figure 19.1. Browsing the catalog pages by offset
Figure 19.2. Browsing the catalog by seeking the next page
Figure 19.3. Viewing item details and placing a bid
Figure 19.4. The workflow of the “Edit item” conversation
Figure 19.5. The first page in the item auction wizard
Figure 19.6. Editing images on the second page of the wizard
Chapter 20. Scaling Hibernate
18.191.62.122