Cheatsheet Persistence
// Structured learning part for Cheatsheet Persistence covering Status Seri.
This overview is designed to help you choose the right entry point quickly. Follow the full track from lesson one, continue from your last checkpoint, or jump straight into a phase that matches what you need right now.
Curriculum Map
Navigate by phase, then choose the lesson that matches your current depth.
Persistence Layer as Boundary, Contract, and Source-of-Truth Interface
19 minFondasi persistence layer sebagai boundary antara Java/JAX-RS application logic dan PostgreSQL/database state.
Driver, Connection, Statement, ResultSet, and Transaction Primitive
17 minFondasi JDBC sebagai primitive utama akses database Java dan dasar dari MyBatis, JPA, dan Hibernate.
Pool Size, Timeout, Leak Detection, and Kubernetes Replica Math
27 minConnection pool sebagai shared runtime resource antara Java/JAX-RS service dan PostgreSQL, termasuk sizing, timeout, leak detection, pool exhaustion, dan Kubernetes replica math.
MVCC, Locks, Isolation, Planner, JSONB, and Timeout Semantics
24 minPerilaku PostgreSQL yang langsung memengaruhi correctness, transaction boundary, locking, query performance, migration safety, dan production debugging persistence layer.
SQL-First Mapping, Mapper Interface, XML, SqlSession, and ResultMap
18 minMyBatis sebagai SQL-first persistence mapper untuk Java/JAX-RS enterprise systems, termasuk mapper interface, XML, SqlSession, ResultMap, parameter mapping, TypeHandler, dynamic SQL, dan transaction integration.
Mapper Interface, XML Organization, Naming, Parameters, and Ownership
22 minDesain mapper interface dan XML yang maintainable, ownership-aware, SQL-visible, transaction-aware, dan aman untuk enterprise production review.
ResultMap, Constructor Mapping, Association, Collection, and TypeHandler
17 minResultMap, constructor mapping, association, collection, nested query, custom TypeHandler, JSONB/array mapping, null handling, and column aliasing for production-grade MyBatis usage.
if, choose, where, trim, foreach, bind, Sorting, Filtering, and Injection Risk
16 minDynamic SQL MyBatis untuk filtering, sorting, pagination, optional parameter, IN clause, update statement, dan query composition dengan security, readability, and performance discipline.
JSONB, Arrays, Functions, Procedures, RETURNING, UPSERT, SKIP LOCKED, and Advisory Locks
20 minMenggunakan fitur PostgreSQL advanced melalui MyBatis: JSONB, full-text search, array, enum, function, procedure, trigger awareness, RETURNING, UPSERT, SKIP LOCKED, dan advisory lock dengan transaction, correctness, performance, testing, dan review discipline.
EntityManager, Persistence Context, Unit of Work, Lifecycle, Flush, and Dirty Checking
15 minFondasi JPA/Jakarta Persistence sebagai ORM specification untuk entity lifecycle, EntityManager, persistence context, unit of work, flush, dirty checking, transactional write-behind, dan dampaknya pada Java/JAX-RS backend dengan PostgreSQL.
Session, Proxy, Lazy Loading, Dirty Checking, Flush Mode, and Cache
27 minHibernate-specific behavior di balik JPA: Session, persistence context, proxy, lazy loading, dirty checking, flush mode, first-level cache, second-level cache, query cache, configuration, dan failure mode yang sering muncul pada Java/JAX-RS backend dengan PostgreSQL.
Table, Column, Id, Sequence, Enum, Converter, Version, Timestamp, and Soft Delete
24 minMapping entity JPA/Hibernate ke schema PostgreSQL: @Entity, @Table, @Column, @Id, @GeneratedValue, sequence, identity, embedded value, enum, converter, AttributeConverter, @Version, timestamp, soft delete, immutable entity, dan checklist review mapping production-grade.
OneToMany, ManyToOne, Join Ownership, Cascade, Orphan Removal, and Fetch Strategy
16 minRelationship mapping yang aman, eksplisit, dan tidak menciptakan N+1 atau cascade surprise dalam Java/JAX-RS enterprise service.
JPQL, Criteria API, Native Query, Projection, Entity Graph, Fetch Join, and Bulk Operations
19 minStrategi query JPA dari JPQL sampai native query dengan SQL visibility, transaction awareness, dan production review discipline.
N+1, Fetch Join, Entity Graph, Batch Fetching, JDBC Batching, and Dirty Checking Cost
15 minPerformance tuning Hibernate dari fetching strategy, batching, persistence context size, dirty checking cost, cache, sampai SQL/query-plan visibility.
Flush Timing, Merge Surprise, Stale State, Unexpected Update, and Hidden SQL
14 minFailure mode JPA yang muncul dari state management tersembunyi: flush timing, dirty checking, merge surprise, stale state, unexpected update, dan hidden SQL.
Explicit SQL vs Persistence Context Driven State Management
20 minPerbedaan fundamental antara MyBatis sebagai SQL-first mapper dan JPA/Hibernate sebagai entity-first unit-of-work dengan persistence context.
When to Use JDBC, MyBatis, or JPA/Hibernate
22 minFramework pemilihan JDBC langsung, MyBatis, atau JPA/Hibernate berdasarkan use case, query complexity, transaction correctness, schema shape, performance, dan operational risk.
Coexistence by Bounded Context, Module, Schema, Use Case, and Transaction Manager
17 minGovernance coexistence MyBatis dan JPA dalam satu service atau ecosystem tanpa menciptakan duplicate persistence model, stale state, cache conflict, atau transaction surprise.
Same Table, Same Aggregate, Same Transaction, Stale State, and Cache Conflict
16 minAnalisis kapan MyBatis dan JPA dalam use case yang sama masih defensible, dan kapan menjadi anti-pattern yang memicu stale state, cache conflict, duplicate write model, dan transaction ordering bug.
Read/Write Separation, Projection Queries, Explicit Flush, Clear, and Ownership Documentation
12 minPola aman ketika MyBatis dan JPA harus hidup berdampingan dalam enterprise Java/JAX-RS service tanpa merusak transaction correctness, cache consistency, dan ownership persistence model.
Two Write Models, Bypassed Entity State, Hidden Flush, Duplicate Validation, and Inconsistent Filters
16 minAnti-pattern utama ketika MyBatis dan JPA/Hibernate dipakai bersama tanpa ownership, transaction ordering, cache discipline, dan invariant consistency yang jelas.
Repository, DAO, Mapper Boundary, EntityManager Boundary, and Read/Write Separation
16 minBoundary design antara service/application layer dan data access implementation dalam Java/JAX-RS enterprise systems.
API DTO, Domain Model, JPA Entity, MyBatis Projection, Command Model, and Mapping Ownership
15 minPemisahan model API, domain, persistence, command, query, dan read model dalam Java/JAX-RS enterprise systems.
ACID, Commit, Rollback, Savepoint, Local Transaction, Declarative and Programmatic Transaction
23 minTransaction boundary sebagai unit correctness utama di persistence layer Java/JAX-RS enterprise systems.
REQUIRED, REQUIRES_NEW, SUPPORTS, NOT_SUPPORTED, MANDATORY, NEVER, NESTED, and Self-Invocation
23 minPropagation semantics, nested transaction caveat, savepoint, self-invocation, dan visibility transaction boundary dalam Java/JAX-RS enterprise systems.
Read Committed, Repeatable Read, Serializable, Lost Update, Write Skew, SELECT FOR UPDATE, SKIP LOCKED, and Retry
17 minIsolation level, concurrent write correctness, lost update, write skew, row locking, serialization failure, deadlock retry, dan concurrency review dalam Java/JAX-RS enterprise systems.
@Version, Manual Version Check, LockModeType, SELECT FOR UPDATE, NOWAIT, SKIP LOCKED, and Business Locks
17 minOptimistic lock, pessimistic lock, manual version check, JPA LockModeType, SELECT FOR UPDATE, NOWAIT, SKIP LOCKED, lock timeout, deadlock, stale object, dan business-level locking.
SQLState, Constraint Violation, Deadlock, Serialization Failure, Timeout, and Retryability
21 minSQLException, SQLState, constraint violation, deadlock, serialization failure, lock timeout, query timeout, JPA/Hibernate/MyBatis exception, domain error mapping, HTTP error mapping, dan retryable vs non-retryable error.
Bean Validation, Domain Invariant, Database Constraint, Lifecycle Callback, and Defense in Depth
24 minBean Validation, database constraint, domain invariant, application validation, JPA lifecycle callback, MyBatis validation boundary, NOT NULL, unique, check, foreign key, validation duplication, defense in depth, dan invariant placement checklist.
Created/Updated Fields, Version, Audit Table, Entity Listener, Trigger, Change History, and Outbox
16 minCreated by, created time, updated by, updated time, version, audit table, audit trigger, JPA auditing, MyBatis auditing, entity listener, database trigger, change history, event outbox, compliance/auditability, dan audit review checklist.
Deleted Flag, Tenant Filter, Effective Date, Validity Window, Catalog Version, and Hidden Data Bugs
13 minSoft delete, deleted flag, deleted timestamp, tenant filter, temporal validity, effective date, valid from/valid to, catalog version, price effective date, JPA filter, MyBatis query condition, database constraint, hidden data bug, dan temporal review checklist.
Tenant ID, Schema/Database Strategy, Tenant Filters, RLS, Indexing, and Cache Isolation
13 minTenant ID, shared database shared schema, separate schema, separate database, tenant discriminator, tenant filter, row-level security, JPA multi-tenancy, MyBatis tenant condition, accidental cross-tenant query, tenant-aware index, tenant-aware cache, dan multi-tenancy review checklist.