logo
  • Home
  • About
  • Training
  • Programming
  • CS
  • IT
  • IS
  • ECE
  • EEE
  • EE
  • Civil
  • Mechanical
  • Chemical
  • Metallurgy
  • Instrumentation
  • Aeronautical
  • Aerospace
  • Biotechnology
  • Agriculture
  • MCA
  • BCA
  • Internship
  • Contact

MongoDB Multiple Choice Questions | MCQs | Quiz

MongoDB Interview Questions and Answers
Pratice MongoDB questions and answers for interviews, campus placements, online tests, aptitude tests, quizzes and competitive exams.

Get Started

•   MongoDB Basics
•   Big Data & MongoDB
•   NoSQL Databases
•   MongoDB Installation - 1
•   MongoDB Installation - 2
•   MongoDB Enterprise - 1
•   MongoDB Enterprise - 2
•   MongoDB Packages
•   MongoDB Getting Started-1
•   MongoDB Getting Started-2
•   Test Data Generation
•   CRUD Concepts
•   Read Operations - 1
•   Read Operations - 2
•   Write Operations - 1
•   Write Operations - 2
•   Analyze Query Performance
•   Data Modeling Basics
•   Data Modeling Concepts - 1
•   Data Modeling Concepts - 2
•   Data Model Patterns
•   Model Tree Structures
•   Model Data Operations
•   Model Monetary & Time
•   GridFS
•   BSON
•   ObjectId
•   MongoDB Documents - 1
•   MongoDB Documents - 2
•   MongoDB Administration
•   Operational Strategies
•   MongoDB Backup
•   MongoDB Monitoring
•   Database Configuration
•   MongoDB Maintenance
•   MongoDB Production
•   Data Management
•   Operational Segregation
•   Capped Collections
•   Data Collections
•   Optimization Strategies - 1
•   Optimization Strategies - 2
•   Optimization Strategies - 3
•   System Collections
•   Database Profiler
•   Exit Codes & Statuses
•   Authentication
•   Authorization
•   Collection Access Control
•   Network Security
•   MongoDB API Interfaces
•   Auditing
•   Kerberos Authentication
•   Security Checklist
•   Access Control
•   User & Role Management
•   Aggregation
•   Aggregation Pipeline
•   Map-Reduce
•   Aggregation Operations
•   Aggregation Mechanics
•   Pipeline Optimization
•   Pipeline Limits
•   Pipeline & Sharded
•   Map-Reduce & Sharded
•   Pipeline Operators - 1
•   Pipeline Operators - 2
•   SQL - Aggregation Mapping
•   Aggregation Commands
•   MongoDB Indexes
•   Index Types - 1
•   Index Types - 2
•   Index Types - 3
•   Index Properties
•   Index Management
•   Geospatial Index
•   Text Search
•   Indexing Strategies
•   Indexing Methods
•   MongoDB Replication
•   Replica Set Members
•   Replica Architectures
•   Replica Set High Availability
•   Read & Write Semantics
•   Master Slave Replication
•   Replication Processes - 1
•   Replication Processes - 2
•   Replication Maintenance
•   Troubleshooting
•   Member Configuration
•   Sharding Introduction
•   Sharding Concepts
•   Cluster Architectures
•   Sharded Cluster Behavior
•   Sharding Mechanics
•   Cluster Deployment
•   ↓ Sharded Cluster ↓
•   Maintenance
•   Troubleshooting
•   Data Management - 1
•   Data Management - 2

Best Reference Books

MongoDB Books
« Prev Page
Next Page »

MongoDB Questions and Answers – Write operations-1

Posted on March 8, 2015 by Manish

This set of MongoDB Multiple Choice Questions & Answers (MCQs) focuses on “Write operations-1”.

1. Indexes are typically available in ______ or located sequentially on disk.
a) RAM
b) ROM
c) CMOS
d) None of the mentioned
View Answer

Answer: a
Explanation: Querying only the index can be much faster than querying documents outside of the index.

2. Point out the wrong statement :
a) Query selectivity refers to how well the query predicate excludes or filters out documents in a collection
b) Query selectivity can determine whether or not queries can use indexes effectively or even use indexes at all
c) More selective queries match a larger percentage of documents
d) All of the mentioned
View Answer

Answer: c
Explanation: More selective queries match a smaller percentage of documents.

3. ___________ is used to determine whether a query is a covered query .
a) explainstats()
b) explain()
c) explainall()
d) all of the mentioned
View Answer

Answer: b
Explanation: db.collection.explain() provides information on the execution of other operations, such as db.collection.update().

4. The ________ message is used to update a document in a collection.
a) UPDATE
b) OP_UPDATE
c) OP_UPDATES
d) All of the mentioned
View Answer

Answer:
Explanation: Only the OP_QUERY and OP_GET_MORE messages result in a response from the database.

5. Point out the correct statement :
a) An equality match on the unique _id field is less selective as it can match at most one document
b) The selectivity of regular expressions depends on the expressions themselves
c) Less selective queries can use indexes effectively or even at all
d) All of the mentioned
View Answer

Answer: b
Explanation: If an index exists for the field, then MongoDB matches the regular expression against the values in the index, which can be faster than a collection scan.

6. _____ can modify specific fields of an existing document or documents or replace an existing document entirely, depending on the update parameter.
a) modify()
b) update()
c) find()
d) none of the mentioned
View Answer

Answer: b
Explanation: By default, the update() method updates a single document.

7. The update() method uses the _______ command, which uses the default write concern.
a) find
b) read
c) update
d) modify
View Answer

Answer: c
Explanation: The update() method returns an object that contains the status of the operation.

8. _________ is used to view statistics about the query plan for a given query.
a) db.explain()
b) cursor.explain()
c) cursor.explainstats()
d) all of the mentioned
View Answer

Answer: b
Explanation: This information can help as you develop indexing strategies.

9. An ________ query plan has returned a threshold number of matching results
a) execution
b) unordered
c) ordered
d) none of the mentioned
View Answer

Answer: c
Explanation: An ordered query plan has returned all the matching results.

10. A query _______ consists of a combination of query, sort, and projection specifications.
a) plan
b) shape
c) stats
d) all of the mentioned
View Answer

Answer: b
Explanation: Index filters determine which indexes the optimizer evaluates for a query shape.

Sanfoundry Global Education & Learning Series – MongoDB.

Here’s the list of Best Reference Books in MongoDB.

To practice all areas of MongoDB, Here is complete set of 1000+ Multiple Choice Questions and Answers.
« Prev Page - MongoDB Questions and Answers – Read Operations-2
» Next Page - MongoDB Questions and Answers – Write operations-2
« MongoDB Questions and Answers – Read Operations-2
MongoDB Questions and Answers – Write operations-2 »

Deep Dive @ Sanfoundry:

  1. CSS Questions and Answers
  2. Oracle Database Questions and Answers
  3. C Programming Examples on Bitwise Operations
  4. RDBMS Questions and Answers
  5. C# Programming Examples on LINQ
  6. Database Management System Questions and Answers
  7. MySQL Database Questions and Answers
  8. SQL Server Questions and Answers
  9. Mechanical Operations Questions and Answers
  10. MongoDB Questions and Answers
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer and SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage & Cluster Administration, Advanced C Programming, SAN Storage Technologies, SCSI Internals and Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him below:
LinkedIn | Facebook | Twitter | Google+

Best Careers

Developer Tracks
SAN Developer
Linux Kernel Developer
Linux Driver Developer
Linux Network Developer

Live Training Photos
Mentoring
Software Productivity
GDB Assignment
Sanfoundry is No. 1 choice for Deep Hands-ON Trainings in SAN, Linux & C, Kernel Programming. Our Founder has trained employees of almost all Top Companies in India such as VMware, Citrix, Oracle, Motorola, Ericsson, Aricent, HP, Intuit, Microsoft, Cisco, SAP Labs, Siemens, Symantec, Redhat, Chelsio, Cavium, ST-Micro, Samsung, LG-Soft, Wipro, TCS, HCL, IBM, Accenture, HSBC, Mphasis, Tata-Elxsi, Tata VSNL, Mindtree, Cognizant and Startups.

Best Trainings

SAN I - Technology
SAN II - Admin
Linux Fundamentals
Advanced C Training
Linux-C Debugging
System Programming
Network Programming
Linux Threads
Kernel Programming
Kernel Debugging
Linux Device Drivers

Best Reference Books

Computer Science Books
Algorithm & Programming Books
Electronics Engineering Books
Electrical Engineering Books
Chemical Engineering Books
Civil Engineering Books
Mechanical Engineering Books
Industrial Engineering Books
Instrumentation Engg Books
Metallurgical Engineering Books
All Stream Best Books

Questions and Answers

1000 C Questions & Answers
1000 C++ Questions & Answers
1000 C# Questions & Answers
1000 Java Questions & Answers
1000 Linux Questions & Answers
1000 Python Questions
1000 PHP Questions & Answers
1000 Hadoop Questions
Cloud Computing Questions
Computer Science Questions
All Stream Questions & Answers

India Internships

Computer Science Internships
Instrumentation Internships
Electronics Internships
Electrical Internships
Mechanical Internships
Industrial Internships
Systems Internships
Chemical Internships
Civil Internships
IT Internships
All Stream Internships

About Sanfoundry

About Us
Copyright
TOS & Privacy
Jobs
Bangalore Training
Online Training
SAN Training
Developers Track
Mentoring Sessions
Contact Us
Sitemap
© 2011 Sanfoundry