Non-Relational Database (NoSQL)

A database that provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases.

翻訳待ちのコンテンツです。英語版を表示しています。

The rise of NoSQL was driven by the need for massive scalability in web-scale companies like Google, Amazon, and Facebook. While NoSQL offers performance and flexibility, it requires a shift in data modeling—focusing on 'Query-First' design rather than 'Normalization'. Modern architectural trends involve 'Polyglot Persistence', where an application uses both a relational [database](/ja/terms/relational-database) (for structured financial transactions) and a non-relational database (for user activity logs or social graphs) to leverage the strengths of both paradigms.

        graph LR
  Center["Non-Relational Database (NoSQL)"]:::main
  Rel_non_relational_database["non-relational-database"]:::related -.-> Center
  click Rel_non_relational_database "/terms/non-relational-database"
  Rel_relational_database["relational-database"]:::related -.-> Center
  click Rel_relational_database "/terms/relational-database"
  Rel_index_database["index-database"]:::related -.-> Center
  click Rel_index_database "/terms/index-database"
  classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
  classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
  classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
  classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
  linkStyle default stroke:#4b5563,stroke-width:2px;

      

🧒 5歳でもわかるように説明

Think of a [relational [database](/ja/terms/database)](/ja/terms/relational-database) like a perfectly organized spreadsheet where every folder has its place. A [non-relational database](/ja/terms/non-relational-database) is like a collection of folders and boxes where you can throw in different types of items—a letter, a photo, a toy—without needing them to all look the same. It's much faster when you have a mountain of stuff to sort through and you don't have time to put everything in a tiny, specific slot.

🤓 Expert Deep Dive

NoSQL databases are governed by the 'BASE' model (Basically Available, Soft state, Eventual consistency), which contrasts with the 'ACID' model of relational databases. This shift is a direct response to the 'CAP Theorem', which posits that a distributed system can only provide two of three guarantees: Consistency, Availability, and Partition Tolerance. NoSQL systems typically prioritize Availability and Partition Tolerance. The four primary categories are: 1. Document Stores (e.g., MongoDB, using JSON/BSON), 2. Key-Value Stores (e.g., Redis, DynamoDB), 3. Column-Family Stores (e.g., Cassandra, HBase), and 4. Graph Databases (e.g., Neo4j). These systems are highly effective for high-velocity data ingestion and horizontal scaling, though they may lack advanced join operations and strict transactional integrity found in SQL.

📚 出典