Online Exam Quiz

questionQuestion  1 to 30

What is the maximum size of a BSON document in MongoDB?

  • 16 MB
  • 256 MB
  • 128 MB
  • 64 MB
Mark for review

What does the 'db' command do in MongoDB?

  • Creates a new database
  • Lists all databases
  • Drops the database
  • Displays current database
Mark for review

Which of the following is a valid MongoDB data type?

  • Timestamp
  • Date
  • Blob
  • Enum
Mark for review

What is the use of the $lookup operator in MongoDB?

  • Deletes documents
  • Joins collections
  • Updates documents
  • Indexes fields
Mark for review

Which of the following is NOT a MongoDB shell method?

  • find()
  • insert()
  • update()
  • add()
Mark for review

Which of the following is NOT a MongoDB data type?

  • boolean
  • int32
  • varchar
  • string
Mark for review

How do you enable text search in MongoDB?

  • create a text index
  • addTextSearch()
  • enableTextSearch()
  • setTextSearch()
Mark for review

How do you enable authentication in MongoDB?

  • Start mongod with --auth
  • Start mongod with --enableAuth
  • Start mongod with --authenticate
  • Start mongod with --secure
Mark for review

Which MongoDB method is used to return only specific fields?

  • returnFields()
  • select()
  • projection()
  • fields()
Mark for review

How do you import data into MongoDB?

  • mongoload
  • mongoimport
  • mongoinput
  • mongoinsert
Mark for review

What type of index does MongoDB create by default for the _id field?

  • Compound index
  • Text index
  • Unique index
  • Sparse index
Mark for review

Which method is used to remove a database in MongoDB?

  • deleteDatabase()
  • dropDatabase()
  • removeDatabase()
  • clearDatabase()
Mark for review

What is sharding in MongoDB?

  • Encrypting data
  • Distributing data across multiple machines
  • Compressing data
  • Backing up data
Mark for review

How can you sort the results of a MongoDB query?

  • sequence()
  • order()
  • arrange()
  • sort()
Mark for review

What is the purpose of the MongoDB replica set?

  • Provides high availability
  • Simplifies schema design
  • Increases speed
  • Reduces storage
Mark for review

Which method is used to find documents in MongoDB?

  • find()
  • fetch()
  • query()
  • search()
Mark for review

Which aggregation pipeline stage is used to filter documents?

  • $select
  • $filter
  • $match
  • $search
Mark for review

Which command is used to drop a collection in MongoDB?

  • removeCollection()
  • drop()
  • deleteCollection()
  • dropCollection()
Mark for review

In MongoDB, which field is added by default to each document?

  • _id
  • uuid
  • doc_num
  • doc_id
Mark for review

How do you view the roles of a user in MongoDB?

  • listRoles(<username>)
  • showUserRoles(<username>)
  • show roles for <username>
  • db.getUserRoles(<username>)
Mark for review

Which MongoDB method is used to convert a collection to a capped collection?

  • setCapped()
  • makeCapped()
  • capCollection()
  • convertToCapped()
Mark for review

Which command is used to start the MongoDB server?

  • mongod
  • mongo
  • mongodb
  • startmongo
Mark for review

How do you create a capped collection in MongoDB?

  • addCappedCollection()
  • createCapped()
  • createCollection() with capped
  • newCappedCollection()
Mark for review

Which data model does MongoDB use?

  • Hierarchical model
  • Network model
  • Relational model
  • Document model
Mark for review

Which storage engine is the default in MongoDB?

  • MMAPv1
  • WiredTiger
  • InnoDB
  • RocksDB
Mark for review

What does the $unset operator do in MongoDB?

  • Sets a field to null
  • Updates a field value
  • Removes a field from a document
  • Adds a new field
Mark for review

What does the MongoDB 'explain' method do?

  • Deletes a document
  • Provides query performance statistics
  • Updates a document
  • Inserts a document
Mark for review

What does the $set operator do in MongoDB?

  • Deletes a field
  • Updates a field
  • Adds a field
  • Queries a field
Mark for review

What is the role of the MongoDB config server?

  • Handles replication
  • Manages user accounts
  • Stores metadata and configuration settings for sharding
  • Backs up data
Mark for review

Which command is used to rename a collection in MongoDB?

  • updateCollectionName()
  • renameCollection()
  • changeCollectionName()
  • setCollectionName()
Mark for review

blinkerOnline

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • Answered
  • Not Answered
  • Marked for Review