DEV Community

Fathe Karim
Fathe Karim

Posted on • Edited on

Crud Operation

CRUD stands for Create, Read, Update and Delete. These are the most basic operation
That can be used with most traditional databases. CRUD operation is the most popular operation in web software. We can create any data, read any data, update any data, delete any data from the database.

Create: Create operation is to create any database or add any value to the database. We can use insertOne() to add a single data to the database to add multiple data we can use insertMany().

Read: Read operation is to get any data from the database. To read the database we can use findOne() method to get a single value for multiple values we can use findMany() method.

Update: Update operation is to update any data value. To perform this we can use updateOne() method to update only one value from the database to update multiple value we can use updateMany()

Delete: Delete operation is to delete any data from the database. To perform this action we need to use DeleteOne() method to delete only one data to delete multiple data we can use deleteMany() method.

Top comments (0)