Databases
1,153 questions in 39 topics. JPA and transactions, writing SQL, how relational databases work inside, NoSQL and search.
Data access, JPA and transactions
12 topics, 333 questionsJDBC and Spring JDBCJDBC API, PreparedStatement and SQL injection, JdbcTemplate and JdbcClient 32 questionsJPA and Hibernate fundamentalsEntities and mapping, entity lifecycle states, persistence context43 questionsRelationships and mappingOne-to-many and many-to-one, many-to-many, owning side and mappedBy27 questionsJPA performanceLazy and eager loading, N+1 problem, fetch joins and entity graphs30 questionsQueriesJPQL, Criteria API, native queries32 questionsSpring Data JPARepository interfaces, derived query methods, @Query25 questionsTransactions@Transactional semantics, propagation, isolation levels36 questionsLocking and concurrency controlOptimistic locking with @Version, pessimistic locking, lost updates18 questionsSchema migrationFlyway, Liquibase, zero-downtime schema changes19 questionsSpring Data for NoSQLMongoDB, Redis, Elasticsearch22 questionsCachingSpring Cache abstraction, @Cacheable, @CachePut, @CacheEvict, Caffeine31 questionsDatabase scaling from a Java serviceRead replicas and routing, sharding, connection limits18 questions
SQL language
4 topics, 137 questionsSQL fundamentalsSELECT, filtering and sorting, NULL and three-valued logic, aggregation, GROUP BY and HAVING37 questionsJoins and subqueriesInner joins, left, right and full outer joins, self joins35 questionsAdvanced SQLCommon table expressions, recursive CTEs, ranking window functions32 questionsSQL interview problemsNth highest salary, finding and removing duplicates, top N per group33 questions
Relational databases
15 topics, 443 questionsRelational data modelingEntity relationship modeling, primary, foreign, natural and surrogate keys, normalization 1NF to BCNF44 questionsIndexesB-tree indexes, hash indexes, composite indexes and column order34 questionsQuery planning and optimizationEXPLAIN and EXPLAIN ANALYZE, cost-based optimizer and statistics, sargable predicates41 questionsACID, isolation and MVCCACID properties, write-ahead logging, dirty, non-repeatable and phantom reads31 questionsLocks inside the databaseRow, page and table locks, shared and exclusive locks, SELECT FOR UPDATE31 questionsViews, procedures and triggersViews, materialized views, stored procedures and functions24 questionsStorage engine internalsPages and the buffer pool, B+ trees, LSM trees and compaction22 questionsPostgreSQLProcess architecture, shared buffers and WAL, VACUUM and autovacuum, tuple visibility and xmin39 questionsMySQL and InnoDBInnoDB architecture and buffer pool, clustered primary key, redo and undo logs30 questionsOracle and SQL ServerOracle sequences, ROWNUM and FETCH FIRST, Oracle undo and read consistency, PL/SQL basics24 questionsReplication and high availabilitySynchronous vs asynchronous replication, replication lag and read-your-writes, failover and leader election25 questionsPartitioning and shardingTable partitioning, horizontal sharding strategies, shard keys and hot spots22 questionsDatabase securityLeast-privilege accounts, SQL injection beyond PreparedStatement, encryption at rest and in transit 21 questionsOperating databasesCapacity planning, monitoring metrics, backup and restore drills31 questionsAnalytics, warehouses and change data captureStar and snowflake schemas, ETL vs ELT, change data capture with Debezium24 questions
NoSQL and search
8 topics, 240 questionsNoSQL fundamentalsDocument stores, key-value stores, wide-column stores26 questionsMongoDBEmbedding vs referencing, MongoDB indexes, aggregation pipeline27 questionsRedisData structures, persistence with RDB and AOF, expiry and eviction24 questionsCassandra and DynamoDBPartition keys and clustering columns, query-first modeling, tunable consistency26 questionsElasticsearch, OpenSearch and LuceneInverted index, analyzers and tokenization, relevance scoring and BM2524 questionsRedis internals and performanceEvent loop, single thread and I/O threads, internal encodings and memory layout, memory usage, fragmentation...35 questionsRedis patterns and use casesRate limiting with Redis, leaderboards and ranking, session storage43 questionsScaling Redis and high availabilityReplication and replica reads, Sentinel failover, Redis Cluster hash slots and resharding35 questions