File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -910,3 +910,24 @@ _Explanation_ : MongoDB's primary advantage as a NoSQL database over traditional
910910- [ ] It is a tool for managing database backups
911911- [x] It is a routing service for sharded clusters
912912- [ ] It is a tool for importing and exporting data
913+
914+ #### Q116. With regards to indexes, what is the difference between dropping a collection and deleting all documents in a collection?
915+
916+ - [x] drop() removes the collection and indexes; deleteMany({}) removes documents only (indexes remain).
917+ - [ ] drop() removes docs but keeps indexes.
918+ - [ ] Both actions behave the same.
919+ - [ ] deleteMany() also removes indexes automatically.
920+
921+ #### Q117. Which operation invalidates all active cursors on a collection?
922+
923+ - [x] Dropping the collection
924+ - [ ] Running a find() query
925+ - [ ] Creating an index
926+ - [ ] Updating multiple documents
927+
928+ #### Q118. What happens to the _ id index when you clone a collection using db.collection.aggregate([ { $out: "newCol" }] )?
929+
930+ - [ ] The original _ id index is copied exactly.
931+ - [ ] The new collection has no _ id index.
932+ - [x] A new _ id index is automatically created on newCol.
933+ - [ ] The _ id index is created only if explicitly specified.
You can’t perform that action at this time.
0 commit comments