Database systems do not all use the same SQL types. Many retain type names that differ from ANSI SQL, making database portability a concern when Java applications manage relational data. A configured SQL dialect lets Hibernate translate standard type choices into types appropriate for a particular database during schema generation. section 6.3.1 section 1.0
Keep two jobs distinct. JDBC provides a partial abstraction over vendor-specific types when Hibernate executes statements such as INSERT and UPDATE. The SQL dialect handles product-specific type translation when Hibernate generates a schema. If Hibernate creates the schema, application code usually need not select native column types directly; with an existing schema, inspect the configured dialect to understand its mappings. section 6.3.1
Numeric and string columns
Hibernate’s H2Dialect maps the ANSI NUMERIC type with `registerColumnType(Types.NUMERIC, "decimal($p,$s)")`. A `BigDecimal` property defaults to `NUMERIC(19, 2)`; set `@Column` precision and scale to change its generated definition. String columns vary too: for MySQL, Hibernate generates `VARCHAR(length)` for lengths up to 65,535 and `MEDIUMTEXT` for lengths up to 16,777,215. The declared length and configured dialect therefore both affect the resulting column type. section 6.3.1
Table 6.1 Java primitive types that map to SQL standard types (view table figure)
Compare Java numeric properties with the ANSI SQL types Hibernate starts from before applying a database-specific column mapping. section 6.3.1

