© Anghel Leonard 2020
A. LeonardSpring Boot Persistence Best Practiceshttps://doi.org/10.1007/978-1-4842-5626-8_16

16. Types and Hibernate Types

Anghel Leonard1 
(1)
Banesti, Romania
 

Item 143: How to Deal with Hibernate and Unsupported Types via the Hibernate Types Library

As a rule of thumb, strive to choose the best database column types. Take your time and scroll your database types, since most databases come with specific types that you can use. For example, MySQL’s MEDIUMINT UNSIGNED stores an integer in the range of 1 to 99999, PostgreSQL’s money type stores a currency amount with a fixed fractional precision, the cidr type holds an IPv4 or IPv6 network specification, and so on. Moreover, strive to use compact types. This will reduce the index ...

Get Spring Boot Persistence Best Practices: Optimize Java Persistence Performance in Spring Boot Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.