🍃

NoSQL: MongoDB & Redis Basics

36 cards · 🇺🇸 English

Core document-store and key-value store concepts with MongoDB and Redis.

Study all 36 cards for free

Flashcards, quizzes, pixel-art games and a daily review that remembers for you.

Study this deck free

Try the first 10 cards

1 / 10
Question

NoSQL originally

Knew itLearning

Tap the card for the answer · swipe right if you knew it, left if not

Already have an account? Sign in

Cards

  1. 1NoSQL originally
    Not only SQL or non-relational - databases that store and retrieve data differently from traditional table-based relational databases
  2. 2Four main types of NoSQL databases
    Key-value stores, document stores, wide-column stores, and graph databases
  3. 3Key-value store
    A NoSQL database that uses associative arrays (maps/dictionaries) as the fundamental data model, storing data as key-value pairs
  4. 4Redis
    An in-memory key-value cache and store known for high performance, supporting various data structures like strings, lists, sets, and hashes
  5. 5MongoDB
    A document-oriented NoSQL database that stores data in JSON-like BSON format, offering ACID transaction support
  6. 6Document store
    A NoSQL database where data is stored as documents (usually JSON, XML, or BSON) that encapsulate and encode data in standard formats
  7. 7What encoding formats do document stores commonly use?
    XML, YAML, JSON, and binary forms like BSON
  8. 8BSON
    Binary JSON - a binary representation of JSON-like documents used by MongoDB for efficient storage and traversal
  9. 9Horizontal scaling
    Scaling by adding more machines to a cluster rather than increasing the power of a single machine (vertical scaling)
  10. 10CAP theorem
    A principle stating that a distributed system can only guarantee two of three properties: Consistency, Availability, and Partition tolerance
  11. 11Eventual consistency
    A consistency model where updates reach all nodes eventually (typically within milliseconds), but may cause brief delays in accessing the latest data
  12. 12Main advantages of NoSQL databases
    Simple design, horizontal scalability, flexible schemas, high performance for specific use cases, and handling unstructured data
  13. 13Main barriers to NoSQL adoption
    Low-level query languages, inability to perform ad hoc joins, lack of standardized interfaces, and existing investments in relational databases
  14. 14Does MongoDB support ACID transactions?
    Yes, MongoDB includes ACID transaction support as a key feature
  15. 15Does MongoDB support joins?
    Yes, MongoDB supports joins, though it did not support joining from sharded collections until version 5.1
  16. 16What data structures does Redis support?
    Strings, lists, sets, sorted sets, hashes, bitmaps, hyperloglogs, and streams
  17. 17Where is Redis data typically stored?
    In memory (RAM) for ultra-fast access, with optional persistence to disk
  18. 18Wide-column store
    A NoSQL database that stores data in columns rather than rows, allowing efficient querying of large datasets (e.g., Cassandra, HBase)
  19. 19Graph database
    A NoSQL database designed for data whose relations are well represented as a graph with nodes and edges (e.g., Neo4j)
  20. 20Schema flexibility in NoSQL
    The ability to store documents with different fields in the same collection, without requiring a fixed schema definition
  21. 21How do NoSQL databases typically handle relational data?
    Through multiple queries, caching/denormalization (storing foreign values), or nested data (embedding related data in documents)
  22. 22Embedding in document databases
    Storing related data within a single document rather than in separate tables (e.g., storing comments inside a blog post document)
  23. 23Denormalization in NoSQL
    Storing actual foreign values along with the model's data rather than just foreign keys, optimizing for read performance
  24. 24Polyglot persistence
    Using multiple database types (SQL and NoSQL) together in a system, each optimized for specific use cases
  25. 25Throughput in database performance
    A metric measured as operations per second, commonly used to evaluate NoSQL database performance
  26. 26YCSB
    Yahoo Cloud Serving Benchmark - a standard benchmark commonly used for performance and scalability comparisons of NoSQL databases
  27. 27What inspired the NoSQL movement?
    The needs of Web 2.0 companies like social media platforms, and open-source clones of Google's Bigtable/MapReduce and Amazon's DynamoDB
  28. 28Collection in MongoDB
    A grouping of documents, analogous to a table in relational databases, but with flexible schemas
  29. 29Stale read
    Reading data that hasn't been updated to the latest version yet, a temporary side effect of eventual consistency
  30. 30Write-ahead logging
    A method to record changes before they're applied to the database, helping prevent data loss

And 6 more cards. Study the whole deck free

Articles about this deck

More Programming decks

See all
Study all 36 cards free