How Do You Write and Run Your First SQL Query in MySQL?
Connect to MySQL, create a small sample table and run your first SELECT query with filtering and sorting. Includes the common beginner errors and fixes.
42 posts about SQL: questions with answers, tutorials and articles, newest first.
Connect to MySQL, create a small sample table and run your first SELECT query with filtering and sorting. Includes the common beginner errors and fixes.
Map a MySQL table to a Java class with @Entity, configure the datasource, and use a Spring Data JPA repository for CRUD in Spring Boot 3 with Jakarta Persistence.
Set up a Spring Boot application with MySQL using mysql-connector-j, JPA and a REST controller, with Docker, migrations and troubleshooting tips.
Spring Boot has no built-in sharding, but a routing DataSource and a good shard key let you split MySQL data across servers. Learn the strategy and pitfalls.
Spring Boot uses HikariCP by default. Set the MySQL URL, tune maximum-pool-size and max-lifetime, and watch the pool with Actuator metrics.
A practical order of work for faster MySQL queries in Spring Boot 3: measure, index, remove N+1, project, paginate, batch and cache.
Set up Spring Boot 3 with MySQL using the current driver, datasource properties, Spring Data JPA, Flyway and HikariCP, avoiding removed dialect settings.
Automate SQL Server full backups and restores from Spring Boot with JdbcTemplate and @Scheduled, with checks for permissions, safety and production use.
Measure with Query Store, add covering indexes, fetch fewer columns, fix N+1 queries and enable JDBC batching to speed up SQL Server in Spring Boot.
Connect Spring Boot to SQL Server with SQL logins, Windows or Kerberos authentication, or an Entra ID managed identity, and keep the credentials secure.
Add the mssql-jdbc driver and JPA starter, set the datasource URL and let Spring Boot auto-configure HikariCP and Hibernate for SQL Server.
Connect Spring Boot to Amazon RDS MySQL with the right security group, driver, datasource properties and TLS, and keep credentials in Secrets Manager.
Register custom SQL functions in Hibernate 6 using FunctionContributor, registerPattern and registerNamed, and call them from HQL, JPQL and Spring Data repositories.
A Hibernate dialect controls the SQL generated for each database. See how auto-detection works in Hibernate 6 and 7, when to set it manually and how to customize it.
Call stored procedures from JPA and Spring Data JPA with @Procedure, named procedures and StoredProcedureQuery, including OUT parameters.
Log Hibernate SQL statements and bind parameter values in Spring Boot 3 using the logging framework, with Hibernate 5 differences and production cautions.
JDBC gives you direct control over SQL, while JPA maps objects to tables for you. Compare them with code examples and learn when to choose each.
JDBC blocks a thread per query; reactive access with R2DBC does not. Compare models, transactions and tooling, and learn when virtual threads are enough.
H2 is an embedded Java database for tests and prototypes; MySQL is a production client-server database. See the differences and how to test safely.
Learn to control JDBC transactions with auto-commit, commit and rollback, savepoints, isolation levels and batching, with safe try-with-resources code.