Which of the following is NOT a typical benefit of using a managed database service?
Think about what tasks managed databases handle for you automatically.
Managed databases handle hardware maintenance for you, so manual hardware maintenance by the user is not a benefit but a responsibility avoided.
Given a managed MongoDB collection users with documents containing {name, age}, what is the output of this query?
db.users.find({ age: { $gt: 30 } }).count()Look at the $gt operator meaning.
The query counts documents where the age field is greater than 30, so it returns the number of users older than 30.
Which option correctly updates the status field to active for all documents where lastLogin is older than 1 year?
db.users.updateMany({ lastLogin: { $lt: new Date(Date.now() - 365*24*60*60*1000) } }, { $set: { status: "active" } })Check the use of new Date() and the update operator $set.
Option A correctly uses new Date() to create a date object and the $set operator to update the field.
You have a managed MongoDB collection with millions of documents. Which option will most improve the performance of queries filtering by email?
Think about how databases speed up searches on specific fields.
Creating an index on the email field allows the database to quickly locate documents matching the filter, improving query speed.
You try to connect to your managed MongoDB instance but get a timeout error. Which option is the most likely cause?
Timeout errors usually relate to connectivity, not query syntax.
A network firewall blocking the connection prevents your client from reaching the database, causing a timeout error.