High-Performance Java Persistence – Chapter 10 – Mapping Types and Identifiers

Part 2, Chapter 10

Every new chapter of my book is released right after it’s being completed, so the reader doesn’t have to wait for the whole part to be finished to get access to new material.

Table of content

This chapter explains the core mapping elements used by Hibernate and details the basic type and the identifier generators.

10. Mapping Types and Identifiers 
10.1 Types
10.1.1 Primitive types
10.1.2 String types 
10.1.3 Date and Time types
10.1.4 Numeric types
10.1.5 Binary types 
10.1.6 UUID types 
10.1.7 Other types
10.1.8 Custom types 
10.2 Identifiers
10.2.1 UUID identifiers The assigned generator 
10.2.2 The legacy UUID generator The newer UUID generator 
10.2.3 Numerical identifiers Identity generator Sequence generator Table generator Optimizers The hi/lo algorithm The default sequence identifier generator The default table identifier generator The pooled optimizer The pooled-lo optimizer Optimizer gain Sequence generator performance gain Table generator performance gain Identifier generator performance 

Chapter summary

The chapter explains the relation between the three mapping elements used by JPA: basic types, embeddables and entities.

Because database systems come with specific data types that are targeted towards high-performance, this chapter covers basic types and explains how you can map database-specific types to Hibernate entities.

The second part of this chapter is dedicated to entity identifiers. It covers UUID and numerical identifiers and it goes through identity, sequence and table generator strategies.
It explains how the enhanced generators differ from the legacy ones, and it covers all major sequence identifier optimizes: hi/lo, pooled and pooled-lo.

In the end, it shows which identifier generator is suitable for high-performance write-intensive applications, and why you should use the enhanced optimizers developed by Hibernate.

Enjoy reading it and I’m looking forward to getting your feedback.

Enter your email address to follow this blog and receive notifications of new posts by email.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s