0Pricing
MongoDB Academy · レッスン

NoSQL の種類:ドキュメント、キーバリュー、カラム、グラフ

NoSQL の4つの系統を比較し、それぞれを現実のユースケースに対応付けます。

「NoSQL の種類:ドキュメント、キーバリュー、カラム、グラフ」はCoddyKit上の無料MongoDB Academyレッスンです。 これはレッスン2/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはMongoDB Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 MongoDB Academyコースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

The NoSQL Family Tree

"NoSQL" isn't one thing — it's a family of four: document, key-value, wide-column, and graph stores. MongoDB is a document store. Let's meet them all.

Document Stores: Rich Nested Data

Document stores keep data as flexible JSON-like documents, with nested objects and arrays all in one place. MongoDB leads here — the most versatile NoSQL type.

// Document store example - a product document
{
  _id: 'prod_001',
  name: 'Wireless Headphones',
  category: 'Electronics',
  specs: { battery: '30h', connectivity: 'Bluetooth 5.0' },
  reviews: [
    { user: 'alice', rating: 5, comment: 'Great!' }
  ],
  price: 79.99
}

Key-Value Stores: Blazing Fast Simplicity

Key-value stores like Redis are the simplest: every item is just a key and a value. Lookups are instant, perfect for caches, sessions, and leaderboards.

// Redis key-value example
SET session:user_42 '{"userId":42,"token":"abc123","expiresAt":1700000000}'
GET session:user_42
// Returns the JSON string immediately - O(1) lookup

// Redis also supports richer structures per key:
LPUSH leaderboard 'alice:9500'
LPUSH leaderboard 'bob:8700'
LRANGE leaderboard 0 9  // top 10

Wide-Column Stores: Analytical Scale

Wide-column stores like Cassandra spread data across many machines and swallow huge write loads. Ideal for IoT sensors, logs, and time-series data.

// Cassandra CQL - wide-column table design
CREATE TABLE sensor_readings (
  device_id  UUID,
  recorded_at TIMESTAMP,
  temperature FLOAT,
  humidity    FLOAT,
  PRIMARY KEY (device_id, recorded_at)
) WITH CLUSTERING ORDER BY (recorded_at DESC);
// Partition key = device_id; clustering key = recorded_at

Graph Databases: Relationships First

Graph databases like Neo4j store connections as first-class data, so they fly through relationships. Great for social networks, fraud rings, and recommendations.

// Neo4j Cypher query - find friends of friends
MATCH (me:Person {name: 'Alice'})
      -[:FRIENDS_WITH]->(friend)
      -[:FRIENDS_WITH]->(foaf)
WHERE NOT (me)-[:FRIENDS_WITH]->(foaf)
  AND foaf <> me
RETURN foaf.name AS suggestion
LIMIT 10;

Comparing the Four Families

Each family shines somewhere: documents for most apps, key-value for caching, wide-column for IoT, graph for relationships. Always ask: how will I query my data?

When to Use a Document Store

Reach for a document store like MongoDB when your data is nested, your schema keeps changing, and you want rich queries without painful JOINs.

Multi-Model Databases

Big systems often mix databases — a pattern called polyglot persistence. MongoDB for data, Redis for caching, each tool doing what it does best.

NewSQL: The Best of Both Worlds?

NewSQL databases like CockroachDB try to blend NoSQL's scaling with SQL's safety. The SQL vs NoSQL choice is less black-and-white than it used to be.

MongoDB in the NoSQL Landscape

MongoDB leads document stores thanks to its BSON format, rich queries, ACID transactions, and the Atlas cloud platform. Often your first and best NoSQL stop.

Choosing the Right NoSQL Family

Quick guide: single-key lookups go to Redis, relationships to Neo4j, time-series to Cassandra, rich nested data to MongoDB. Unsure? MongoDB is a safe start.

Quick Check

Test your understanding of MongoDB & NoSQL Databases concepts from this lesson.

Lesson Recap

You met the four NoSQL families, saw why MongoDB's documents fit most apps, and learned how polyglot persistence mixes tools. Next: the CAP theorem.

よくある質問

「NoSQL の種類:ドキュメント、キーバリュー、カラム、グラフ」レッスンは無料ですか?

はい。「NoSQL の種類:ドキュメント、キーバリュー、カラム、グラフ」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、MongoDB Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 MongoDB Academyコースには全4レッスンが含まれています。

「NoSQL の種類:ドキュメント、キーバリュー、カラム、グラフ」で何を学びますか?

NoSQL の4つの系統を比較し、それぞれを現実のユースケースに対応付けます。 ブラウザで直接実行するハンズオンコードでMongoDB Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

MongoDB Academyを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのMongoDB Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン2/4です。

「NoSQL の種類:ドキュメント、キーバリュー、カラム、グラフ」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このMongoDB Academyレッスンでコードを書いて実行できますか?

はい。すべてのMongoDB Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. リレーショナルデータベースのボトルネック
  2. NoSQL の種類:ドキュメント、キーバリュー、カラム、グラフ
  3. CAP 定理を平易に理解する
  4. MongoDB が適する領域
← MongoDB Academyに戻る