What tool do you use to see if you have a problem in the consumption of disk I / 0?
Which of the following aggregate commands in MongoDB uses a pipeline approach with the goals of improving the aggregation performance?
Consider a contacts collection that contains these documents:
{ " _id " : 1, " name " : " Poppy " , " birthday " : " 03-09-1984 " }
{ " _id " : 2, " name " : " Ashley " , " birthday " : " 08-12-1990 " }
{ " _id " : 3, " name " : " Cleo " , " birthday " : " 11-02-1976 " }
What query returns the document where the field name is " Poppy " ?
Consider the following example document:
{
" _id " : Objectld( " 5360c0a0a655a60674680bbe " ),
" user "
" login " : " irOn "
" description " : " Made of steel "
" date " : ISODate( " 2014-04-30T09:16:45.836Z " ),
}
>
and index creation command:
db.users.createlndex( { " user.login " : 1, " user.date " : -1 }, " mylndex " )
When performing the following query:
db.users.find( { " user.login " : /Air.*/ },
{ " user " :1, " _id " :0 > ).sort( { " user.date " :1 > )
which of the following statements correctly describe how MongoDB will handle the query? Check all that apply.
A MongoDB administrator needs to create a new role with only the read privileges for the products database.
What command should the administrator use?
If the value of totalKeysExamined is 30000 and the value of totalDocsExamined is 0, which of the following option is correct?
If you have created a compound index on (A,B, C) which of the following access pattern will not be able to utilize the index?
Using an arbiter allows one to easily ensure an odd number of voters in replica sets. Why is this important?
Consider a clothing collection that contains these documents:
{ " _id " : 1, " item " : " sweater " , " sizes " : [ " XS " , " S " ] }
{ " _id " : 2, " item " : " t-shirt " , " sizes " : [ " S " , " M " , " XL " ] }
{ " _id " : 3, " item " : " vest " , " sizes " : [ " M " , " L " , " XL " , " XXL " ] }
What does the following query return?
db.clothing.find({ " sizes " : " M " })
Which of the following collections stores authentication credentials in MongoDB?
In a replicated cluster, which of the following node would only be used during an election?
A department store maintains a clothing collection:
{ " _id " : 1, " item " : " sweater " , " sizes " : [ " XS " , " S " , " L " ] }
{ " _id " : 2, " item " : " t-shirt " , " sizes " : [ " S " , " M " , " L " ] }
{ " _id " : 3, " item " : " vest " , " sizes " : [ " M " , " L " , " XL " , " XXL " ] }
An employee runs:
db.clothing.find( { " sizes " : " M " } )
Which index should improve performance for this query the MOST?
Which of the following is a valid insert statement in mongodb? Select all valid.
What command is used to grant a role " customRole1 " to an existing user called " user1 " ?
You have the following index on the toys collection:
{
" manufacturer " : 1,
" name " : 1,
" date " : -1
}
Which of the following is able to use the index for the query? Check all that apply.
Update If Correct is an approach for which of the following concepts in MongoDB:
Given the following MongoDB document in the users collection:
{ " userid " : 1, " first " : " John " , " roles " : " Basic " }
Which statement results in this document?
{ " userid " : 1, " first " : " John " , " roles " : " SuperUser " }
A MongoDB database administrator needs to improve the performance of the following query:
db.employees.find(
{},
{ name: 1, department: 0, salary: 1 }
).sort({ department: 1, salary: -1 });
What index should the administrator use to achieve this goal?
Which TWO commands can be used to check for all active operations on the current node?
When should we consider representing a one-to-many relationship in an embedded collection instead of separate collection?
A collection and a document in MongoDB is equivalent to which of the SQL concepts respectively?
Consider the following document from the products collection:
What does the following query using $elemMatch return? db.products.find( { product_code: " 345678 " }, { variations: { $elemMatch: { size: ^L^ } } } )
Which TWO commands can be used to remove the role, " specialRole " from " user1 " ?
Given a collection posts as shown below having a document array comments, which of the following command will create an index on the comment author descending?
In a sharded replica set environment, the w Option provides ability for write concern and j Option provides ability for the data to be written on disk journal. Consider that we have a seven member replica set and we want to assure that the writes are committed to journal. What should be the value of j?
Which features of relational database management systems were deliberately omitted in MongoDB and help us to obtain horizontal scalability? Check all that apply.
What command set removes node-1.cluster1.mycompany.local:27017 and node-2.cluster1.mycompany.local:27017 from the replica set, then adds node-1.cluster1.mycompany.local:27017 back to the replica set?
A user stores movie data in a collection called movies. The collection contains thousands of documents.
A sample document looks like this:
{ " title " : " Titanic " , " year " : 1997, " rating " : 8.6 }
The user runs the following query to sort movies first by year, and then by rating:
db.movies.find().sort({ " year " : 1, " rating " : -1 })
Which index would improve the query ' s performance the MOST?
Suposse tou have the following collection with only 2 documents:
If you run an aggregation query and use { $unwind: " $traits " } as the first stage, how many documents will be passed to the next stage of the aggregation pipeline?
Which of the following commands finds all the documents in the posts collection with post timestamp field as null?
In a sharded replicas set environment with multiple mongos servers, which of the following would decide the mongos failover?
What command should a MongoDB database administrator use to find the disk utilization of the order collection?
Consider a collection posts which has fields: Jd, post_text, post_author, post_timestamp, post_tags etc. Which of the following query retrieves ONLY the key named post_text from the first document retrieved?
Below is a sample document in a given collection test.
{ a : 5, b : 3, c: 2, d : 1 >
Given a compound index { a: 1, b:l, c:l, d:l}, Which of the below query will not use in-memory sorting? Select
all valid.