Loading

Quipoin Menu

Learn • Practice • Grow

express-js / CRUD Operations with Database
mcq
Direction: Choose the correct option

Q1.

What does CRUD stand for?
A. Create, Read, Update, Delete
B. Compile, Run, Undo, Debug
C. Connect, Retrieve, Upload, Destroy
D. Create, Replace, Update, Drop
Direction: Choose the correct option

Q2.

In a RESTful API, which HTTP method corresponds to the 'Create' operation?
A. PUT
B. POST
C. GET
D. DELETE
Direction: Choose the correct option

Q3.

How do you implement a 'Read' operation for a single item in Express with Mongoose?
A. Model.get(id)
B. Model.findOne({ _id: id })
C. Model.findById(id)
D. Both B and C
Direction: Choose the correct option

Q4.

What is the purpose of Model.findByIdAndUpdate(id, update)?
A. To update multiple documents
B. To create a new document
C. To find and delete
D. To find a document by ID and update it atomically
Direction: Choose the correct option

Q5.

Which method would you use to delete a document in Mongoose?
A. Model.delete(id)
B. Model.findByIdAndDelete(id)
C. Model.remove({ _id: id })
D. Both B and C