MultipleChoice
Given a replica set with five data-bearing members, suppose the main goes down with operations in its oplog that have been copied from the main to only one secondary. Assuming no other problems occur, which of the following describes what is most likely to happen?
OptionsMultipleChoice
Which of the following operator can be used to control the number of items of an array that a query returns?
OptionsMultipleChoice
What is the use of mongodump and mongorestore tools?
OptionsMultipleChoice
What is the output of following two commands in MongoDB: db. posts. insert({n_id":l}) db.posts.insert({"_id":l})
OptionsMultipleChoice
Which of the following is a valid Replica Set configuration if you want:
1-Have 3 copies of everything
2- That RS3 is never primary
2- That RSI and RS2 can be primary?
You had to see the different configurations, RS3 could be hidden or priority 0 (But not a referee because we need
3 replicas), while RSI and RS2 could NOT have priority 0 or be hidden or anything like that
In a 4-member RS RSO , RSI, RS2 and RS3 + Referee, RSO (primary) falls after some write operations that have
replicated RSI and RS2 (but NOT RS3), who can get up as the new primary?
The configuration comes and in it we see that RS2 has a hidden: true (or a priority: 0, (I don't remember)
OptionsMultipleChoice
Which of the documents below will be retrieved by the following query? Assume the documents are stored in a collection called 'sample'. Check all that apply.
db.sample.find( { '$or' : [ { 'a' : { '$in' : [ 3, 10] > }, { 'b' : { '$lt' : 2 > > ] > )
OptionsMultipleChoice
Dada una coleccion, cuales devuelve con la siguiente query db.coleccion.find({nombre:'ruben',apellido:'gomez'},{nombre:l,apellido:l,aficion:l});
OptionsMultipleChoice
What is the output of following two commands in MongoDB: db. posts. insert({n_id':l}) db.posts.insert({'_id':l})
OptionsMultipleChoice
Consider the following document:
> db.c.find()
{ '_id' : 12, b : [ 3, 5, 7, 2, 1, -4, 3, 12 ] }
Which of the following queries on the 'c' collection will return only the first five elements of the array in the 'b'
field? E.g.,
Document you want returned by your query:
{ '_id' : 12, 'b' : [ 3, 5, 7, 2, 1 ] >
OptionsMultipleChoice
What is the equivalent command in MongoDB for the following SQL query?
SELECT * FROM posts WHERE author like "%john%"
Options