Discover MongoDB quiz

Test your knowledge path progress

Return to article

  1. MongoDB supports query joins between collections.
    1. True
    2. False
  2. Replica sets in MongoDB offer the following benefits (pick all that apply):
    1. Data redundancy
    2. Distributed transaction support
    3. Automated failover & high availability
    4. Disaster recovery
  3. In replica sets, all write requests are automatically sent to secondary nodes directly.
    1. True
    2. False
  4. MongoDB documents are represented as XML.
    1. True
    2. False
  5. Fix this query:
    db.words.find({}).orderBy({spelling:1})

    FIX:

    db.words.find({}).sort({spelling:1})
  6. Fix this query:
    db.words.find({}).sort({spelling:1}).rows(3)

    FIX:

    db.words.find({}).sort({spelling:1}).limit(3)
  7. Searching for elements in a document array requires you specify a positional element (i.e. document.arrary[i]).
    1. True
    2. False
  8. MongoDB enforces attribute similarity across documents in a collection (i.e. all word documents must have an array of synonyms).
    1. True
    2. False
  9. To find all documents that do not contain the attribute 'synonyms' this query will work.
    db.words.find({synonyms:{$exist:false}})
    1. True
    2. False
  10. In Mongo, frequently accessed data is stored:
    1. On disk
    2. In memory
  11. MongoDB supports indexes just like any other relational database.
    1. True
    2. False
  12. Indexes can make document queries faster but:
    1. They can make inserts and updates slightly slower
    2. Require specialized query commands to even be leveraged (in other words, hints)
    3. They do not work in a replica set environment

Return to article