MongoDB Basics Quiz Quiz

  1. Question 1

    Which of the following is NOT a type of NoSQL database?

    1. Document-based
    2. Key-Value
    3. Graph-based
    4. Relational
    5. SQL-based
  2. Question 2

    What format does MongoDB use to store data?

    1. XML
    2. BSON
    3. CSV
    4. JSON
    5. TXT
  3. Question 3

    Which of the following commands is used to check the list of databases in MongoDB shell?

    1. show databases
    2. list dbs
    3. display databases
    4. db.list()
    5. see databases
  4. Question 4

    What is the default port for MongoDB server?

    1. 27017
    2. 8080
    3. 5432
    4. 3306
    5. 27018
  5. Question 5

    In MongoDB, what is the equivalent of a 'table' in relational databases?

    1. Field
    2. Document
    3. Collection
    4. Index
    5. Record
  6. Question 6

    How can you install MongoDB on Windows?

    1. Using pip install mongodb
    2. Using MongoDB MSI Installer
    3. Running npm install mongodb
    4. Installing via apt-get install mongodb
    5. Using yum install mongodb
  7. Question 7

    Which MongoDB tool provides a graphical interface for managing databases?

    1. MongoDB Shell
    2. MongoDB Compass
    3. MongoDB CLI
    4. MongoDB Studio
    5. MongoVue
  8. Question 8

    What is the purpose of an ObjectId in MongoDB?

    1. It ensures unique identifiers for documents
    2. It acts as a primary key in collections
    3. It contains timestamp information
    4. All of the above
    5. It is used for indexing
  9. Question 9

    What is the primary function of MongoDB Atlas?

    1. To provide a cloud-based MongoDB database service
    2. To visualize query execution plans
    3. To act as an alternative to MongoDB Compass
    4. To perform offline backups of local databases
    5. To store data locally
  10. Question 10

    What is BSON in MongoDB?

    1. A text-based format similar to JSON
    2. A relational database format
    3. A binary representation of JSON
    4. A compressed SQL format
    5. A new form of SQL
  11. Question 11

    Which command is used to insert a single document into a MongoDB collection?

    1. db.collection.insertOne()
    2. db.collection.insert()
    3. db.collection.add()
    4. db.collection.create()
    5. db.collection.save()
  12. Question 12

    What is the purpose of indexing in MongoDB?

    1. To improve query performance
    2. To reduce storage space
    3. To ensure data integrity
    4. To encrypt data
    5. To improve insert performance
  13. Question 13

    Which operator is used to find documents where a field equals a specific value?

    1. $eq
    2. $gt
    3. $lt
    4. $ne
    5. $in
  14. Question 14

    What does CRUD stand for in the context of database operations?

    1. Create, Read, Update, Delete
    2. Compile, Run, Update, Delete
    3. Create, Rename, Update, Deploy
    4. Calculate, Report, Update, Distribute
    5. Copy, Restore, Update, Destroy
  15. Question 15

    Which command is used to remove a collection from a MongoDB database?

    1. db.collection.drop()
    2. db.collection.delete()
    3. db.collection.remove()
    4. db.collection.erase()
    5. db.collection.discard()