# Database Concepts and Technologies in the architect-awesome Knowledge Base

> Explore the architect-awesome knowledge base for essential database concepts and technologies covering relational theory MySQL NoSQL and caching solutions to build robust applications.

- Repository: [xingshaocheng/architect-awesome](https://github.com/xingshaocheng/architect-awesome)
- Tags: knowledge-base
- Published: 2026-03-05

---

**The architect-awesome repository curates comprehensive database knowledge spanning relational theory, MySQL internals, NoSQL systems, and high-performance caching solutions.**

The `xingshaocheng/architect-awesome` repository serves as a centralized knowledge base for software architects, documenting essential **database concepts and technologies** across multiple paradigms. This guide examines the specific topics, implementation details, and practical code examples found in the repository's [`README.md`](https://github.com/xingshaocheng/architect-awesome/blob/main/README.md) and related sections.

## Relational Database Theory and Normalization

The knowledge base establishes foundational relational theory before diving into specific implementations.

### Normal Forms and Functional Dependencies

The repository documents the **three normal forms (1NF, 2NF, 3NF)** and extends coverage to **BCNF (Boyce-Codd Normal Form)**. Key concepts include:

- **First Normal Form (1NF)**: Atomic values in each column
- **Second Normal Form (2NF)**: Elimination of partial dependencies
- **Third Normal Form (3NF)**: Removal of transitive dependencies
- **Functional Dependency**: Relationships between attributes that determine normalization strategy

These theoretical foundations appear in the repository's "基础理论" (Basic Theory) section, providing the mathematical basis for schema design decisions.

## MySQL Implementation and Optimization

The architect-awesome repository dedicates substantial coverage to MySQL, ranging from storage engine internals to distributed deployment strategies.

### InnoDB Storage Engine and Indexing

The [`README.md`](https://github.com/xingshaocheng/architect-awesome/blob/main/README.md) section on MySQL details **InnoDB** as the primary storage engine, contrasting it with legacy **MyISAM**. Critical technical concepts include:

- **B-Tree Indexing**: The default index structure for InnoDB tables
- **Clustered Indexes**: Data stored with primary key indexes
- **Adaptive Hash Index (AHI)**: In-memory optimization for frequently accessed pages
- **Storage Engine Differences**: Transaction support, row-level locking, and crash recovery capabilities

The repository emphasizes understanding these mechanisms for effective schema design and query optimization.

### High Availability and Scaling Strategies

For production deployments, the knowledge base documents several MySQL scaling patterns:

- **Partitioning**: Horizontal partitioning strategies for large tables
- **Sharding**: Database and table splitting (分库分表) for horizontal scaling
- **Master-Slave Replication**: Asynchronous replication for read scaling
- **MySQL Cluster**: NDB cluster for high availability
- **HAProxy + Keepalived**: Load balancing and failover at the proxy layer

These architectural patterns address the challenges of scaling relational databases beyond single-node limitations.

### Performance Tuning with EXPLAIN

The repository includes practical guidance on **SQL optimization** using MySQL's `EXPLAIN` command:

- **36 Rules for MySQL Optimization**: A curated list of best practices
- **Lock Types**: Pessimistic locking (悲观锁) versus optimistic locking (乐观锁)
- **Index Failure Scenarios**: Conditions where indexes become ineffective
- **Pagination Optimization**: Techniques for efficient large-offset queries

The `EXPLAIN` output analysis helps identify full table scans, index usage, and join optimization opportunities.

## NoSQL and Wide-Column Stores

Beyond relational systems, architect-awesome covers distributed NoSQL databases designed for horizontal scalability and flexible schemas.

### MongoDB Document Model

The repository documents **MongoDB** as a representative document store:

- **Document-Oriented Storage**: JSON-like BSON documents with flexible schemas
- **Weak Consistency**: Eventual consistency models for distributed deployments
- **Horizontal Scaling**: Native sharding support for distributing data across clusters

MongoDB serves use cases requiring rapid iteration on data models and high write throughput.

### HBase and RowKey Design

For wide-column storage, the knowledge base covers **HBase**:

- **Column-Family Storage**: Data organized into column families rather than rigid tables
- **RowKey Design**: Critical performance consideration for load balancing and scan efficiency
- **LSM-Tree Architecture**: Log-structured merge trees for write-optimized storage

The repository emphasizes that proper **RowKey design** (often incorporating hash prefixes and timestamps) determines HBase cluster performance.

## Caching and Key-Value Stores

The architect-awesome repository dedicates significant coverage to high-performance caching layers that complement primary databases.

### Redis Data Structures and Persistence

**Redis** receives detailed treatment as an in-memory data structure server:

- **Single-Threaded Architecture**: Event loop design ensuring atomic operations
- **Data Structures**: Strings, hashes, lists, sets, sorted sets, bitmaps, hyperloglogs
- **Persistence Options**: RDB (snapshotting) and AOF (append-only file) strategies
- **Advanced Patterns**: Distributed locks, bloom filters, bitmap operations for analytics
- **Pub/Sub Messaging**: Real-time message broadcasting capabilities

The repository positions Redis as both a cache and a lightweight message broker.

### Memcached and Auxiliary Engines

For simpler caching scenarios, the knowledge base includes:

- **Memcached**: Classic memory object caching with TTL support and LRU eviction
- **Tair**: Alibaba's distributed key-value store compatible with Redis protocols, offering persistent and non-persistent storage options

Additionally, the repository documents auxiliary storage engines:

- **MDB**: Pure in-memory storage for ultra-low latency
- **RDB**: Redis-like lightweight persistence engine
- **LDB**: LevelDB implementation using LSM-Trees for write-heavy workloads

## Summary

The `xingshaocheng/architect-awesome` repository provides comprehensive coverage of **database concepts and technologies** essential for system architecture:

- **Relational foundations** including normal forms, functional dependencies, and BCNF
- **MySQL internals** covering InnoDB storage, B-Tree indexing, replication, and sharding strategies
- **NoSQL systems** such as MongoDB for document storage and HBase for wide-column workloads
- **Caching layers** including Redis data structures, persistence mechanisms, and Memcached for simple object caching
- **Auxiliary engines** like Tair, MDB, RDB, and LDB for specialized storage requirements

## Frequently Asked Questions

### What normal forms are covered in the architect-awesome knowledge base?

The repository documents the **three standard normal forms (1NF, 2NF, 3NF)** along with **BCNF (Boyce-Codd Normal Form)**. These concepts appear in the "基础理论" (Basic Theory) section, covering atomic values, partial dependencies, transitive dependencies, and functional dependency theory essential for relational schema design.

### Which MySQL storage engines are documented in the repository?

The knowledge base primarily focuses on **InnoDB** as the default transactional storage engine, detailing its B-Tree indexing, clustered indexes, and adaptive hash index capabilities. It also references **MyISAM** as a legacy non-transactional engine for historical context, while emphasizing InnoDB's advantages for modern applications requiring ACID compliance and row-level locking.

### How does the architect-awesome repository address NoSQL database technologies?

The repository covers NoSQL through three main categories: **document stores** (MongoDB with flexible BSON schemas and horizontal sharding), **wide-column stores** (HBase with column-family storage and critical RowKey design patterns), and **distributed key-value systems** (Tair). Each section addresses consistency models, scaling strategies, and architectural trade-offs specific to these non-relational paradigms.

### What caching technologies are included in the knowledge base?

The repository documents **Redis** as a primary in-memory data structure server supporting strings, hashes, lists, sets, bitmaps, and pub/sub messaging, with persistence via RDB and AOF. It also covers **Memcached** for simple TTL-based object caching, **Tair** as a Redis-compatible distributed cache, and auxiliary engines including **MDB** (pure memory), **RDB** (lightweight persistence), and **LDB** (LevelDB/LSM-Tree based).