← CodeClarityLab Home
Browse by Category
+ added · updated 7d
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Optimistic Locking
A concurrency pattern using a version column to detect conflicting concurrent writes — no row locks held between read and write.
1mo ago database advanced
SELECT FOR UPDATE
A locking read that acquires exclusive row locks — preventing other transactions from modifying selected rows until commit.
1mo ago database advanced
Change Data Capture (CDC)
A pattern for tracking and streaming every insert, update, and delete from a database — by reading the database's internal transaction log rather than polling tables — enabling real-time event-driven integrations without impacting query performance.
2mo ago database advanced
Write-Ahead Log (WAL)
A durability technique where changes are written to an append-only log before being applied to the database — if the system crashes, the log is replayed to restore the database to a consistent state.
2mo ago database advanced
Column-Level Encryption PHP 7.1+
Encrypting sensitive database columns (SSN, credit card, medical data) — application holds the key; database never sees plaintext; breach exposes only ciphertext.
2mo ago database advanced
Diagram: Eventual Consistency in Databases Eventual Consistency in Databases
A consistency model where replicas are not immediately synchronised — all nodes will converge to the same state given no new writes, trading consistency for availability and partition tolerance.
2mo ago database advanced
Graph Databases
Databases where relationships are first-class citizens — Neo4j, Amazon Neptune — optimised for traversing complex networks of connected entities that are expensive in relational databases.
2mo ago database advanced
Diagram: PostgreSQL VACUUM & ANALYZE PostgreSQL VACUUM & ANALYZE PHP 5.0+
VACUUM reclaims storage from dead tuples created by MVCC updates and deletes. ANALYZE updates query planner statistics. Both are essential for PostgreSQL performance.
2mo ago database advanced
Diagram: Composite Index Design Composite Index Design PHP 5.0+
A composite index covers multiple columns — column order determines which queries benefit, following the leftmost prefix rule.
2mo ago database advanced
Diagram: Database Deadlocks Database Deadlocks PHP 5.0+
A situation where two or more transactions hold locks the other needs, each waiting indefinitely — resolved by the database killing one transaction.
2mo ago database advanced
Diagram: EXPLAIN ANALYZE EXPLAIN ANALYZE PHP 5.0+
The database command that shows the actual execution plan of a query — revealing sequential scans, missing indexes, and row estimate errors that cause slow performance.
2mo ago database advanced
Diagram: Pessimistic vs Optimistic Locking Pessimistic vs Optimistic Locking PHP 5.0+
Pessimistic locking acquires a database lock upfront preventing conflicts. Optimistic locking detects conflicts at write time using a version column — trading lock overhead for conflict detection.
2mo ago database advanced
SQL Window Functions PHP 5.0+
SQL functions that perform calculations across a set of rows related to the current row without collapsing them into a single output row.
2mo ago database advanced
Diagram: Transaction Isolation Levels Transaction Isolation Levels PHP 5.1+
SQL standards defining how and when changes made by one transaction are visible to others, trading consistency for concurrency.
2mo ago database advanced
✓ schema.org compliant