Databases
Data persistence is at the heart of every backend system. This domain covers relational databases (SQL, indexes, transactions), NoSQL trade-offs, connection pooling (HikariCP), and schema migration tools (Flyway and Liquibase). Understanding how to write efficient queries and manage schema evolution safely is expected at every level.
What You'll Find Here
Notes are being added. Planned topics:
| Topic | Description |
|---|---|
| SQL Fundamentals | SELECT, JOIN types, GROUP BY, window functions, subqueries. |
| Indexes & Query Performance | B-tree indexes, composite indexes, EXPLAIN plans, index pitfalls. |
| Transactions & ACID | Atomicity, Consistency, Isolation (levels), Durability; deadlocks. |
| Connection Pooling | HikariCP configuration (maximum-pool-size, connection-timeout). |
| NoSQL Trade-offs | CAP theorem; when to use Redis, MongoDB, Cassandra, or Elasticsearch. |
| Schema Migration | Flyway vs. Liquibase; versioned migrations; repeatable scripts. |
Learning Path
- SQL Fundamentals —
JOINtypes andGROUP BYwith aggregation are the most common SQL interview questions. - Indexes — understand when an index helps and when it hurts (write amplification).
- Transactions & ACID — isolation levels (READ COMMITTED, REPEATABLE READ, SERIALIZABLE) and their phantom-read implications.
- Connection Pooling — HikariCP is Spring Boot's default; know the key pool size configuration settings.
- Schema Migration — Flyway is the simpler option; Liquibase supports rollbacks. Know the trade-offs.
Related Domains
- Spring Data — JPA and
@Transactionalare the Spring abstraction over the database layer. - System Design — database selection (relational vs. NoSQL) is a core system design skill.
- Docker — databases in local development environments are typically run with Docker Compose.