Which option can be used with update command so that a new document gets created if no matching document is found based on the query condition?

Which option can be used with update command so that a new document gets created if no matching document is found based on the query condition?A . upsert command instead of update commandB . {update: true, insert: true} as the third parameter of update commandC . This has to be handled in application code...

Continue reading

If the value of totalKeysExamined is 30000 and the value of totalDocsExamined is 0, which of the following option is correct?

If the value of totalKeysExamined is 30000 and the value of totalDocsExamined is 0, which of the following option is correct?A . None of the aboveB . The query used an index to fetch the resultsC . The query returned 0 documentsD . The query returned 30000 documents after scanning the documents View Answer...

Continue reading

Assuming no other problems occur, which of the following describes what is most likely to happen?

Given a replica set with five data-bearing members, suppose the primary goes down with operations in its oplog that have been copied from the primary to only one secondary. Assuming no other problems occur, which of the following describes what is most likely to happen?A . missing operations will need to be manually re-performedB...

Continue reading

Dada una coleccion, cuales devuelve con la siguiente query db.coleccion.find({nombre:"ruben",apellido:"gomez"},{nombre:l,apellido:l,aficion:l});

Dada una coleccion, cuales devuelve con la siguiente query db.coleccion.find({nombre:"ruben",apellido:"gomez"},{nombre:l,apellido:l,aficion:l});A . { "-id" : Objectld("580a42b5dfblb5al7427d302"), "nombre" : "ruben", "apellido" : "gomez", "aficion" : v u "flipar" }B . { "_id" : Objectld("580a42acdfblb5al7427d301"), "nombre" : "Luis", "apellido" : "gomez", "aficion" : u "flipar" }C . { "_id" : Objectld("580a42acdfblb5al7427d301"), "nombre" : "ruben", "apellido" : "Pablo",...

Continue reading