Loading

Quipoin Menu

Learn • Practice • Grow

mongodb / CLI Task Manager
mcq
Direction: Choose the correct option

Q1.

In a task manager CLI app using MongoDB, how would you typically store tasks?
A. In a single JSON file
B. As documents in a 'tasks' collection
C. In memory
D. As separate databases
Direction: Choose the correct option

Q2.

What fields might a task document commonly include?
A. All of the above
B. `dueDate`, `priority`
C. `description`, `completed`, `createdAt`
D. All of the above
Direction: Choose the correct option

Q3.

How would you mark a task as completed in the database?
A. Insert a new completed task
B. Use a separate collection
C. Delete the task
D. Update the task document by setting `completed: true`
Direction: Choose the correct option

Q4.

To list only incomplete tasks, what query would you use?
A. { status: 'incomplete' }
B. { completed: false }
C. { completed: true }
D. { done: false }
Direction: Choose the correct option

Q5.

What MongoDB feature would be useful for automatically adding a timestamp when a task is created?
A. `$currentDate` operator
B. Default values in the schema
C. Triggers
D. Application code only