WeChat stores 1.3 billion users' chat records locally on devices using SQLite via its WCDB framework, avoiding EB-scale server costs while enabling instant search via FTS5 full-text indexing, with SQLCipher encryption and automatic sharding at 240MB per database file.
This article explains why WeChat stores chat records locally using SQLite instead of cloud databases, detailing the cost savings, privacy benefits, and performance advantages of embedded databases, along with WeChat's custom WCDB framework, FTS5 full-text search, encryption, and the trade-offs of local-only storage.
WeChat uses SQLite for chat storage because its embedded, zero-process design fits mobile constraints; ACID transactions and B+tree indexes ensure message durability and fast pagination; WAL enables concurrent reads/writes; SQLCipher encrypts per-device; sharding by session mitigates single-writer limits, offering a blueprint for local-first apps.
The article explains how database transactions ensure atomicity, consistency, isolation, and durability, showing why they are essential for preventing data inconsistency, loss, and reconciliation errors, and provides step‑by‑step SQL examples of successful and rolled‑back transactions along with practical tips for safe usage.
The article explains what a database transaction is, breaks down the ACID properties, details MySQL’s four isolation levels with their appropriate use‑cases and pitfalls, and provides step‑by‑step SQL and SpringBoot code to reproduce and resolve dirty reads, non‑repeatable reads, and phantom reads.
This article demystifies databases by contrasting them with Excel, explains core concepts such as tables, rows, columns, primary and foreign keys, compares relational and NoSQL systems, introduces SQL CRUD operations, ACID properties, and provides a quick MySQL hands‑on guide, helping readers decide when to adopt a database.
This article explains why database transactions are a core backend skill, breaks down the four ACID properties, clarifies dirty read, non‑repeatable read and phantom read, compares the four isolation levels, and offers practical guidelines for choosing the right level in production.
This article explains why rhythmic, rhyming mnemonics boost memory, lists ready‑made mnemonics for key system‑architecture concepts such as the OSI model, TCP three‑way handshake, CAP theorem, ACID properties, SOLID principles, and shows step‑by‑step methods for creating your own memorable verses while warning against over‑reliance.
The article uses a simple money‑transfer scenario to introduce database transactions, explains the four ACID properties, illustrates common concurrency anomalies such as dirty reads, non‑repeatable reads and phantom reads, and outlines the four isolation levels with their trade‑offs and default settings in MySQL and Oracle.
The article contrasts Elasticsearch’s search‑oriented design—using inverted indexes, near‑real‑time BASE consistency, schema‑free JSON documents, and horizontal scaling—with relational databases’ precise row‑based storage, ACID guarantees, strict schemas, B+‑tree indexes, and vertical scaling, showing how they complement rather than compete.
The article explains why ACID guarantees break down in distributed systems, introduces the BASE and CAP trade‑offs, then details six concrete transaction solutions—2PC, 3PC, TCC, Saga, local message tables, and reliable messages—highlighting their processes, drawbacks, and a decision framework for selecting the right approach.
During peak events like Alibaba's Double‑11 and WeChat's red‑packet frenzy, distributed systems must trade strict consistency for availability; this article explains the CAP theorem, introduces the BASE model, compares CP and AP designs, and provides real‑world case studies and selection guidelines.
This guide explains MySQL's transaction architecture—from the ACID properties and their implementation with undo/redo logs and MVCC, through isolation levels and common concurrency anomalies, to detailed lock types, deadlock detection, and practical performance‑tuning strategies.
This article explains MySQL transaction fundamentals, illustrates a banking transfer scenario, details the ACID properties, explores dirty reads, non‑repeatable reads and phantom reads, and compares the four SQL‑92 isolation levels with practical code examples and InnoDB behavior.
This comprehensive guide explains MySQL's ACID fundamentals, typical isolation anomalies, the four isolation levels with their lock behaviors, practical SQL examples, how to view and set isolation levels, lock types, a bank‑transfer case study, deadlock avoidance tips, and key interview takeaways.
This article explains MySQL's transaction isolation levels, the ACID principles behind them, common anomalies like dirty reads, non‑repeatable reads and phantom reads, the locking mechanisms that enforce isolation, and how to configure the desired level in practice.
This article explains what database transactions are, why they matter, details MySQL’s transaction commands, the ACID properties, isolation levels, lock types, MVCC, how to use InnoDB, handle errors, employ savepoints, and provides concrete SQL examples for creating, committing, rolling back, and managing transactions.
This comprehensive guide explains MySQL storage engine concepts, compares built‑in engines like InnoDB and MyISAM, details how to view and configure engines, and covers transaction fundamentals, isolation levels, locking mechanisms, and practical migration case studies for reliable database operations.
Learn how to safely manage PostgreSQL transactions using DataGrip by understanding ACID principles, executing BEGIN, COMMIT, and ROLLBACK commands, handling errors, and applying practical tips for visibility, connection loss, and Docker deployments, all illustrated with step‑by‑step screenshots.
This article explores the purpose of database transactions, the various failure scenarios they guard against, the nuances of consistency across ACID, replica and CAP models, and how atomic commit and consensus mechanisms ensure reliable distributed data processing.
A two‑decade‑old MySQL bug (bug 11472) that prevents triggers from firing on cascading foreign‑key updates has remained unfixed, sparking community frustration, debates over ACID compliance, and a shift toward alternatives like PostgreSQL in modern applications.
This article provides a comprehensive overview of database transactions, explaining ACID properties, transaction states, explicit and implicit transaction control, isolation levels, and how to configure and use them in MySQL with practical SQL examples and code snippets.
This article combines a Meituan salary update with detailed explanations of MySQL indexing strategies, B‑tree variations, ACID transaction properties, isolation levels, caching, handling high‑traffic queries, the Raft consensus algorithm, and an overview of gRPC, providing comprehensive backend development knowledge for interview preparation.
This article provides a comprehensive analysis of MySQL’s internal architecture, detailing the four-layer design, the server service layer’s parsing, optimization and execution components, and the critical roles of Undo Log, Redo Log, and Binlog in ensuring ACID transaction properties.
This article explains MySQL InnoDB's ACID properties in depth, detailing how atomicity relies on Redo and Undo logs, how consistency ensures business logic integrity, how isolation uses locks and MVCC with snapshot and current reads, and how durability is achieved through Redo logs, the innodb_flush_log_at_trx_commit setting, and the Double Write mechanism.
This article provides a comprehensive overview of MySQL's layered architecture, the functions and core components of the server layer, and detailed explanations of Undo Log, Redo Log, and Binlog mechanisms that together ensure the ACID properties of transactions, including practical execution flows for queries and updates.
This article explains the concept and importance of MySQL database transactions, describes the ACID properties, shows how to use transaction control statements and savepoints, and demonstrates each isolation level (read uncommitted, read committed, repeatable read, serializable) with practical SQL examples.
Despite the hype around NoSQL, this article argues that SQL and relational databases remain the superior choice for transactional data, tracing two decades of research, highlighting the limitations of NoSQL, and showing how modern databases now incorporate the best features of both worlds.
This comprehensive guide explains MySQL transaction fundamentals, defines dirty reads, non‑repeatable reads and phantom reads, compares the four isolation levels, shows how to query and set them, and details the underlying locking mechanisms such as MVCC and next‑key locks.
The article explains why transaction isolation is essential in databases, describes common concurrency problems such as lost updates, dirty reads, non‑repeatable reads, and phantom reads, and outlines MySQL's four isolation levels with their effects and trade‑offs.
This article compares PostgreSQL and MySQL across history, ACID compliance, performance, scalability, advanced features, tooling, security, backup strategies, and Linux installation steps, helping full‑stack developers choose the most suitable open‑source relational database for their projects.
This comprehensive guide explores MySQL transaction fundamentals, the ACID properties, various isolation levels, concurrency issues like dirty, non‑repeatable, and phantom reads, and dives deep into MVCC implementation, hidden fields, undo logs, and read views to help developers write reliable, consistent database code.
Transaction isolation prevents concurrency issues such as dirty writes, dirty reads, non‑repeatable reads, and phantom reads in MySQL, and the article explains these problems, the ACID properties of transactions, and the four isolation levels—read uncommitted, read committed, repeatable read, and serializable.
This article explains MySQL transaction fundamentals, the necessity of ACID properties, details the four isolation levels and their impact on phenomena like dirty reads, non‑repeatable reads, and phantom reads, and provides practical SQL examples and strategies for ensuring data consistency in high‑concurrency environments.
This article explains the concept of database transactions, the ACID properties, how MySQL implements transactions with InnoDB, how to manage autocommit, the essential transaction control statements, a practical example using savepoints, and the four isolation levels supported by MySQL.
This article explains the fundamentals of database transactions, the ACID properties, and why distributed transactions are needed, then walks through the implementation details of redo/undo logs, local transactions, CAP and BASE theory, and evaluates five major distributed‑transaction solutions—2PC, TCC, local‑message tables, maximum‑effort notification, and Saga—with concrete examples, pros, and cons.
MySQL 8.0 introduces a native document store that brings full ACID‑compliant NoSQL capabilities, schema‑less JSON handling, simple CRUD APIs, seamless SQL integration, large‑document support, built‑in security and infrastructure simplification, enabling developers and DBAs to leverage existing MySQL expertise for modern applications.
This article explains the ACID properties of transactions and compares various implementation approaches—including database‑level mechanisms, Spring single‑datasource transactions, and distributed transaction frameworks such as Seata and RocketMQ—while analyzing their advantages, drawbacks, and suitable scenarios.
This article explains core distributed‑system concepts such as the CAP theorem, ACID and BASE transaction models, idempotent design, and various distributed transaction mechanisms including two‑phase and three‑phase commit, TCC/Saga compensation, message‑based transactions, and popular frameworks like JDTS and Seata.
This guide explains MySQL transaction fundamentals, the ACID properties, how to use explicit and implicit transactions, savepoints, and demonstrates each isolation level with commands and examples to help developers write reliable, concurrent database code.
This article explains the fundamentals of database transactions, the ACID properties, and how InnoDB uses redo and undo logs together with MVCC to ensure atomicity, consistency, isolation, durability, and reliable crash recovery.
This article explains the fundamentals of distributed consistency, covering strong, weak, and eventual consistency, the CAP theorem, BASE model, and how ACID principles relate to modern distributed systems, helping engineers balance availability and data integrity in large‑scale architectures.
This article explains how MySQL InnoDB achieves the ACID properties—Atomicity, Consistency, Isolation, Durability—by detailing the roles of undo logs, redo logs, buffer pool, lock mechanisms, and MVCC, and outlines transaction lifecycle commands, isolation levels, and consistency guarantees.
This article explains MySQL’s internal architecture, walks through how a SELECT query and an UPDATE statement are processed—including the connector, parser, optimizer, executor, redo log, binlog, and two‑phase commit—and details transaction properties, isolation levels, MVCC, and related configuration parameters.
The article explains why transaction isolation is needed, describes common concurrency problems such as lost updates, dirty reads, non‑repeatable reads and phantom reads, outlines the ACID properties of a transaction, and details MySQL's four isolation levels and their impact on data consistency.
This article explains the importance of data safety, defines the ACID properties of transactions, details how InnoDB implements them, and shows how Spring's @Transactional annotation works with AOP, including default rollback behavior, configuration options, and common pitfalls that can cause transaction failures.
This article explains the ACID properties of database transactions, clarifies the often‑confused concepts of consistency and isolation, details the four SQL standard isolation levels, compares lock‑based and MVCC concurrency controls, and examines concrete implementations in MySQL, PostgreSQL, and the distributed TDSQL system.
The article explains why transaction isolation is required, describes common concurrency problems such as lost updates, dirty reads, non‑repeatable reads and phantom reads, and outlines MySQL's four isolation levels with their effects on data consistency.
This article explains how MySQL's InnoDB engine guarantees ACID properties by describing the four components of ACID, the four isolation levels, lock granularity and types, the MVCC mechanism with version chains and read views, and the roles of undo, redo, and bin logs in ensuring atomicity, consistency, isolation, and durability.
Database testing ensures data integrity, security, and quality by validating data mapping, ACID properties, schema, triggers, stored procedures, and field constraints through both manual and automated methods, using SQL queries, CRUD operations, and specialized tools to verify that applications interact correctly with underlying databases.
This article explains the fundamentals of local transactions, highlights their advantages and limitations, introduces the challenges of distributed transactions across services and databases, and reviews common solutions such as 2PC, reliable messaging, TCC, and max‑effort notification.
The article explains why transaction isolation is needed, describes common concurrency problems such as lost updates, dirty reads, non‑repeatable reads and phantom reads, outlines the ACID properties of a transaction, and details MySQL's four isolation levels with their effects and default settings.
This article explains the fundamentals of distributed consistency, covering consistency levels, ACID and CAP principles, BASE theory, and practical protocols such as 2PC, 3PC, and TCC, while also discussing real‑world patterns like cache consistency and reliable messaging.
This article explains how transactions, consistency, and consensus interrelate in distributed systems, reviews replication models, details ACID properties, internal consistency models, consensus algorithms, and Kafka’s configuration and transaction support, and highlights verification tools like TLA+ and Jepsen for ensuring correctness.
Reflecting on reading, the author reviews CAP theory’s consistency‑availability‑partition trade‑offs, extends ACID and BASE concepts, proposes modernizing CAP objects to consistency, fault and disaster tolerance, and examines how cloud‑native architectures, micro‑services, and SLA‑driven designs reshape fault tolerance and future self‑healing systems.
This article explains the fundamentals of distributed transactions, including ACID properties, consistency models, sharding strategies, and the two‑phase, three‑phase, and TCC protocols, while discussing CAP and BASE theories and the challenges of implementing reliable distributed databases.
The article examines why robust fault‑tolerance is essential for data stores, explains how transactions simplify error handling, breaks down the ACID guarantees, illustrates isolation and durability with concrete examples and diagrams, and discusses when multi‑object transactions are truly needed.
This article explains how Delta Lake adds reliability to data lakes by offering ACID transactions, scalable metadata, and unified batch‑and‑stream processing, outlines the challenges it solves, details its implementation principles, and demonstrates a practical demo for building an integrated data warehouse.
This article explains the fundamentals of data lakes and data warehouses, compares their architectures, outlines the challenges of data lakes, and then dives deep into Delta Lake's core features, storage model, ACID guarantees, concurrency handling, and provides step‑by‑step Spark code examples for practical use.
This article explains the fundamentals of distributed transactions, the ACID properties, various consistency models, database sharding strategies, and the two‑phase, three‑phase, and TCC commit protocols, while also discussing CAP, BASE, and practical challenges in large‑scale systems.
This article explains the fundamentals of distributed transactions, covering ACID properties, consistency models, sharding strategies, CAP and BASE theories, and compares two‑phase, three‑phase, and TCC commit protocols to illustrate how modern systems maintain data integrity across multiple nodes.
This article breaks down how MySQL's InnoDB engine guarantees the four ACID properties—atomicity, consistency, isolation, and durability—by leveraging undo and redo logs, the binary log, hidden transaction metadata, and MVCC with ReadView, illustrating each mechanism with concrete examples.
This article explains the ACID properties of database transactions, distinguishes between single‑node and distributed transactions, describes the two‑phase and three‑phase commit protocols, discusses transaction states, fault tolerance, and recovery mechanisms, and shows how replication and consensus can provide high availability for transaction processing.
This article explains the concept of consistency in distributed transactions, compares strong and weak consistency, relates it to the CAP theorem, and explores theoretical and practical approaches—including XA, NewSQL, and MVCC—to achieve stronger consistency across databases and micro‑services.
This article walks through MySQL’s internal query processing pipeline, the roles of the connector, parser, optimizer and executor, explains InnoDB’s redo log and binlog mechanisms with a WAL analogy, and details transaction ACID properties, isolation levels, and concurrency anomalies.
This article explains how data consistency is achieved through local ACID transactions, global XA/2PC mechanisms, CAP and BASE theories, and practical patterns such as reliable events, TCC, and SAGA, providing a comprehensive overview for architects designing distributed systems.
This article examines Martin Kleppmann’s view of Kafka as a database, breaking down how Kafka handles atomicity, consistency, isolation, and durability through event streams and partitioning, and argues why MySQL still remains essential for many workloads.
This article provides a comprehensive overview of Snowflake and Delta Lake, detailing their cloud‑native architectures, storage‑compute separation, transaction support, performance optimizations, and a side‑by‑side comparison of their capabilities, openness, and real‑time data handling.
This article explains distributed transactions, covering ACID properties, consistency models, sharding strategies, the CAP and BASE principles, and detailed mechanisms such as two‑phase commit, three‑phase commit, and the TCC pattern, illustrating how to maintain data integrity across multiple databases.
This article walks through MySQL's core concepts—including ACID guarantees, the four isolation levels, undo and redo logs, buffer pool flushing, lock types, gap locks, deadlock scenarios, and the B+‑tree based index architecture—providing interview‑ready insights and practical examples.
This article explains the fundamentals of ACID, how Redis implements transactions with MULTI, EXEC, DISCARD and WATCH commands, provides code examples, and analyzes whether Redis transactions satisfy atomicity, consistency, isolation, and durability.
This article explains the concept of database transactions, the ACID properties, various isolation levels, and how Spring Framework implements transaction propagation, isolation, and architecture, providing both theoretical background and practical guidance for developers.
This article walks through essential MySQL interview topics, covering basic concepts, OLTP vs OLAP, normalization forms, DML/DDL/DCL, varchar vs char trade‑offs, storage engines, ACID properties, primary and foreign keys, and how to monitor running queries, all presented from an interviewer's perspective.
This article uses the classic two‑generals story to illustrate communication failures in distributed systems, then explains local versus distributed transactions, their roles, scenarios, and classifications, linking concepts such as atomicity, retries, idempotence, and the three‑way handshake.
This article explains the fundamentals of local transactions and ACID properties, introduces CAP and BASE theories, discusses compensation jobs and transaction messages, and reviews distributed transaction models such as two‑phase commit, three‑phase commit, XA, TCC, Saga, and the Seata framework.
This article explains how MySQL's InnoDB engine implements ACID properties by detailing transaction atomicity, consistency, isolation levels, lock granularity, MVCC version chains, undo/redo logs, buffer pool behavior, and the interplay between redo log and binlog to ensure durability and data integrity.
This article explains the concept of database transactions, the ACID properties, MySQL's four isolation levels, the phenomena they cause such as dirty reads, non‑repeatable reads and phantom reads, and provides step‑by‑step experiments demonstrating each isolation level in practice.
This article explains how MySQL InnoDB guarantees the ACID properties—Atomicity, Consistency, Isolation, and Durability—through its lock mechanisms, multi‑version concurrency control, undo/redo logs, buffer pool management, and the interaction between binlog and redo log.
This article introduces Apache Iceberg as an open table format for massive analytic datasets, explains its underlying concepts such as schema, partitioning, statistics, and read/write APIs, compares it with Hive Metastore, outlines its ACID commit process, highlights the performance and operational advantages for big‑data workloads, and previews upcoming community features.
This article explains MySQL transaction fundamentals, the ACID properties, common concurrency problems, isolation level differences, and how InnoDB implements MVCC using version chains and consistency views, illustrated with practical examples and diagrams.
This article uses the story of Tai Chi from the novel *The Heaven Sword and Dragon Saber* to explain the CAP theorem, ACID properties, BASE theory, and two‑phase commit in distributed systems, illustrating how consistency, availability, and partition tolerance correspond to the hard and soft aspects of Tai Chi.
This article explains the core concepts of database transactions—including ACID properties, common concurrency anomalies, MySQL isolation levels, Spring's isolation and propagation settings, and the CAP theorem's impact on distributed transactions—providing a comprehensive overview for developers and engineers.
This article introduces JD's real‑time data warehouse evolution, outlines the limitations of traditional Lambda‑based warehouses, compares open‑source lake formats (Delta, Hudi, Iceberg), explains Delta Lake's transaction‑log architecture and read flow, and demonstrates how a unified batch‑stream development model simplifies data processing and improves reliability.
This article examines the core requirements of data lakes and provides an in‑depth comparison of three major open‑source solutions—Apache Hudi, Apache CarbonData, and Delta Lake—highlighting their architectures, ACID support, query capabilities, and suitability for various real‑time and batch use cases.
This article explains how MySQL implements transaction ACID properties by using redo and undo logs, lock mechanisms, and MVCC, detailing the roles of each component in achieving atomicity, durability, isolation, and consistency for reliable concurrent data processing.
This article explains how MySQL implements transaction features such as atomicity, durability, and isolation by using redo logs, undo logs, lock mechanisms, and MVCC, detailing their roles, generation processes, and the impact of different isolation levels on data consistency.
This article explains core distributed‑system concepts—including the CAP theorem, ACID and BASE models, consistency guarantees, and the mechanics of 2PC, 3PC, and TCC transaction protocols—while also discussing availability strategies and practical design considerations.
Google Cloud engineer Jaana Dogan shares 17 hard‑earned database lessons—from ACID nuances and isolation levels to optimistic locking, sharding strategies, AUTOINCREMENT pitfalls, clock drift, and online migrations—providing a practical guide to help developers avoid common pitfalls and design more reliable data systems.
This article provides a comprehensive overview of MySQL InnoDB's internal architecture, covering its memory and disk structures, buffer pool, change buffer, adaptive hash index, log buffer, various tablespace types, page layout, undo and redo logs, double‑write buffer, transaction isolation levels, and how the engine satisfies ACID properties.
This article explains the four transaction isolation levels—Read Uncommitted, Read Committed, Repeatable Read, and Serializable—detailing how each level prevents or allows dirty reads, non‑repeatable reads, and phantom reads, and describes the underlying lock mechanisms.
The article explains distributed consistency problems and the two‑phase commit (2PC) protocol using a restaurant kitchen and a multiplayer game analogy, detailing how a coordinator ensures atomic transactions across multiple services and discussing the inherent drawbacks of 2PC.
This article introduces JDTX, a high‑performance, ACID‑compliant distributed transaction middleware, explains its architecture based on WAL and MVCC, compares rigid two‑phase commit and flexible BASE‑based approaches, and discusses the technical difficulties and future roadmap for integrating JDTX with Apache ShardingSphere and cloud‑native platforms.
This article explains the origins and motivations of Delta Lake, details its ACID transaction support, schema enforcement, metadata handling, versioning, and unified batch‑and‑stream processing, and provides a step‑by‑step Maven and Spark code tutorial for creating, updating, and querying Delta tables.
This article explains the concept of database transactions, the ACID properties, details MySQL’s four isolation levels—Read Uncommitted, Read Committed, Repeatable Read, and Serializable—and provides step‑by‑step command‑line experiments demonstrating phenomena such as dirty reads, non‑repeatable reads, phantom reads, and serialization effects.
OceanBase’s TPC‑C benchmark demonstrates how its distributed database achieves high durability, atomicity, isolation, and consistency on commodity cloud servers using Paxos‑based log replication, two‑phase commit, MVCC, and replicated tables, highlighting the architectural challenges and solutions for ACID compliance.
This article provides a comprehensive technical analysis of OceanBase’s record‑breaking TPC‑C benchmark, covering the preparation work, test system design, planning, performance testing methodology, ACID verification, and the lessons learned from achieving 60.88 million tpmC on a distributed cloud platform.
This article explains MySQL's lock types—including table and row locks, InnoDB's shared, exclusive, and intention locks—covers lock algorithms such as record, gap, next‑key, and insert‑intention locks, discusses deadlock and blocking issues, and details transaction management, isolation levels, and related configuration parameters.
This article explains the fundamentals of database transactions, the ACID properties, how they differ in distributed environments, and details two‑phase and three‑phase commit protocols while offering personal insights on the challenges of implementing distributed transactions.