181. Which command configures MongoDB Atlas App Services?
- a) Atlas UI/API only
- b) db.createAppService()
- c) mongod --appServices
- d) db.appServices.setup()
Test your knowledge of Database - [MongoDB] section with these interactive multiple-choice questions.
181. Which command configures MongoDB Atlas App Services?
182. What is the purpose of the $millisecond operator?
{ $millisecond: "$date" } extracts the millisecond component.
183. Which method enables MongoDB's LDAP authentication?
security.ldap settings in mongod.conf and proper startup flags.
184. What does the $second operator return?
{ $second: "$date" } extracts the second component (including leap seconds).
185. Which operator performs case-insensitive string comparison?
{ $strcasecmp: ["text", "TEXT"] } returns 0 (equal).
186. What is the purpose of the $limit stage?
{ $limit: 10 } passes only the first 10 documents downstream.
187. Which command lists all MongoDB's current sessions?
188. What does the $toDouble operator do?
{ $toDouble: "3.14" } returns 3.14 as 64-bit floating point.
189. Which method returns MongoDB's operation execution stats?
serverStatus() output.
190. What is the purpose of the $dateToString operator with format?
{ $dateToString: { format: "%Y-%m-%d", date: "$date" } } produces "2023-06-15".
191. Which operator checks if all array elements match a condition?
{ $allElementsTrue: { $map: { input: "$array", in: condition } } }.
192. What does the $toLong operator do?
{ $toLong: "1234567890" } returns a 64-bit integer.
193. Which command lists all Atlas Triggers?
194. What is the purpose of the $toDecimal operator?
{ $toDecimal: "123.456" } returns high-precision decimal (MongoDB 4.4+).
195. Which operator checks if value is a boolean?
{ $type: ["$field", "bool"] } to check boolean type.
196. What does the $minute operator return?
{ $minute: "$date" } extracts the minute component.
197. Which method returns MongoDB's WiredTiger cache stats?
serverStatus()'s WiredTiger section.
198. What is the purpose of the $toBool operator?
{ $toBool: 1 } returns true, { $toBool: 0 } returns false.
199. Which operator checks if value is a date?
{ $type: ["$field", "date"] } to verify date type.
200. What does the $year operator return?
{ $year: "$date" } extracts the 4-digit year (e.g., 2023).