0Pricing
MongoDB Academy · Lektion

NoSQL-Varianten: Dokument, Schlüssel-Wert, Spalte, Graph

Vergleichen Sie die vier NoSQL-Familien und ordnen Sie jeder reale Anwendungsfälle zu.

NoSQL-Varianten: Dokument, Schlüssel-Wert, Spalte, Graph ist eine kostenlose MongoDB Academy-Lektion auf CoddyKit. Dies ist Lektion 2 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des MongoDB Academy-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der MongoDB Academy-Kurs umfasst insgesamt 4 Lektionen.

Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.

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.

Häufig gestellte Fragen

Ist die Lektion „NoSQL-Varianten: Dokument, Schlüssel-Wert, Spalte, Graph“ kostenlos?

Ja — der vollständige Text von „NoSQL-Varianten: Dokument, Schlüssel-Wert, Spalte, Graph“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des MongoDB Academy-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der MongoDB Academy-Kurs umfasst insgesamt 4 Lektionen.

Was lerne ich in „NoSQL-Varianten: Dokument, Schlüssel-Wert, Spalte, Graph“?

Vergleichen Sie die vier NoSQL-Familien und ordnen Sie jeder reale Anwendungsfälle zu. Du übst MongoDB Academy mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.

Brauche ich Erfahrung, um MongoDB Academy zu starten?

Keine Vorkenntnisse erforderlich. MongoDB Academy auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 2 von 4.

Wie lange dauert die Lektion „NoSQL-Varianten: Dokument, Schlüssel-Wert, Spalte, Graph“?

Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.

Kann ich in dieser MongoDB Academy-Lektion Code schreiben und ausführen?

Ja. Jede MongoDB Academy-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.

Alle Lektionen in diesem Kurs

  1. Der Engpass relationaler Datenbanken
  2. NoSQL-Varianten: Dokument, Schlüssel-Wert, Spalte, Graph
  3. Das CAP-Theorem einfach erklärt
  4. Die Rolle von MongoDB
← Zurück zu MongoDB Academy