Complete the code to show all databases in MongoDB shell.
show [1]The show databases command lists all databases in the MongoDB shell.
Complete the code to switch to a database named 'school'.
use [1]The use command switches the current database. Here, we switch to the 'school' database.
Fix the error in the command to list collections in the current database.
db.[1]()The correct method to list collections in the current database is db.getCollectionNames() or db.listCollections().
Fill both blanks to insert a document with name 'Alice' and age 25 into the 'users' collection.
db.users.[1]([2])
Use insertOne to add a single document. The document is an object with name and age fields.
Fill all three blanks to find all documents in 'products' collection where price is greater than 100.
db.products.[1]([2]: { [3]: 100 })
The find method retrieves documents. The query uses price field with $gt operator for 'greater than'.