Database Articles
4 articles about Database. Explore Spring Boot implementation, design, and operations across related topics.
-
Database Migration Management with Liquibase in Spring Boot
A guide to introducing Liquibase in Spring Boot, covering XML/YAML/SQL changelog notation, how to write changeSets, executing rollbacks, and comparison and selection criteria against Flyway, complete with implementation code.
-
How to Properly Configure and Tune Spring Boot's HikariCP Connection Pool - Why the Default of 10 Isn't Enough
Tuning steps to eliminate 'Connection is not available' errors in Spring Boot's HikariCP. Covers the default maximumPoolSize of 10 and the official formula (cores × 2 + 1), revising connectionTimeout from 30s to 3s, the relationship between maxLifetime and wait_timeout, and leak detection with leakDetectionThreshold, all with implementation examples. Includes comparison data showing timeout error rates reduced from 40% to 3% through configuration changes.
-
Database Migration Management with Flyway in Spring Boot - An Introductory Guide from Version Control to Production Deployment
A practical guide to safely version-controlling database schemas with Flyway in Spring Boot applications. Explains spring-boot-starter-flyway setup, application.properties configuration, the flyway_schema_history table mechanism, handling existing databases with baseline-on-migrate, and troubleshooting using flywayRepair with concrete examples.
-
Introduction to Spring Boot JPA Relationship Mapping - How to Use @OneToMany/@ManyToOne/@ManyToMany and mappedBy
A beginner-friendly explanation of @OneToMany/@ManyToOne/@ManyToMany/mappedBy in Spring Boot JPA. Resolves common pitfalls with code examples covering the differences between bidirectional/unidirectional relationships, cascade, FetchType, the N+1 problem, and circular reference countermeasures.