Skip to main content

Database.

12 posts — Posts about Database

01

PolarDB's Storage-Compute Separation

An architectural look at PolarDB's storage-compute separation: how decoupling compute from storage addresses scalability, storage cost, and high availability, compared with AWS Aurora and traditional MySQL architecture.

02

The Canal Component

Canal is Alibaba's open-source component for incremental subscription and consumption based on MySQL Binlog. This post walks through how it works, how it compares to other common CDC tools, and what to watch out for in a highly available cluster deployment.

03

Neo4j: A Graph Database

Neo4j is a high-performance graph database built on the graph data model, excelling at relationship-heavy workloads. This post covers its licensing, data structure, and main features, plus caveats to weigh when evaluating it.

04

A Taxonomy of Databases

Classifying databases along the dimensions of data model, processing style, deployment, storage medium, and access pattern, with typical use cases for each category.

05

MySQL Rounds Your Timestamps

MySQL's DATETIME defaults to second precision, so milliseconds coming from Java get rounded — sometimes adding a whole second out of thin air. Here's why it happens, plus two fixes: DATETIME(fsp) and truncation on the Java side.

06

A Deep Dive into the InnoDB Buffer Pool

A detailed look at the InnoDB Buffer Pool's layered structure and page management: the Page Hash, the Free/LRU/Flush lists, hot/cold data partitioning, and the four moments dirty pages get flushed to disk.

07

The MySQL Execution Pipeline

Tracing a SQL statement's full journey through MySQL: from the connector to the executor, how the Buffer Pool cuts disk IO, and the roles of the Redo Log, Bin Log, and Undo Log along with two-phase commit.

08

Distributed Transactions with Seata

In a microservice architecture, every business module gets its own DB storage node, and cross-database calls bring the distributed transaction problem. This post walks through Seata's roles and the principles and trade-offs of its four modes: AT, TCC, Saga, and XA.

09

An Introduction to HBase, Compared with MongoDB

HBase is a column-oriented, scalable distributed storage system that can handle PB-scale data on clusters of commodity PC servers. This post walks through its architecture, read/write paths, LSM-tree structure, strengths and weaknesses, and compares its use cases with MongoDB.

10

MySQL Transaction Deadlocks Explained

How concurrent transactions walk step by step into a mutual-waiting standoff: deriving deadlock causes from lock ordering, explaining InnoDB's undo-log-based rollback choice and the wait-for graph detection mechanism, and closing with practical ways to reduce deadlock probability.