DEV Community

Cover image for CRUD Operations
Nafisa Muntaha
Nafisa Muntaha

Posted on

CRUD Operations

CRUD Operations

CRUD stands for Create, Read, Update and Delete. They are the four basic operations that are necessary for storage application.

The capacity to create, read, update and delete items in a web application is important for the development of a website and making it interactive. For example: if we are making a blog page and someone wants to post blogs, without CRUD operations it would be a real problem.

Create

The create allows adding items or data to the database. It will add a new row on the database table for adding that data. To create data, the HTTP Post method is used, it is used to create new data for the database.

Read

The read allows reading from the database. It would never change the data. To read a resource HTTP Get method is used. No matter how many times you call the Get method, you’ll get the same data stored in there.

Update

The update is used to update any data from the database. If you store the price of stocks and after a few days it has gone up, you would want to change the previous price to the current price. It means you would update the price from the previous one. The PUT method is used for updating data from the database. After updating it, the data will be changed from the database, also the updated data will be displayed on the website.

Delete

The delete is used to delete data from the database or remove any resource from the system. For example, you stored your favorite dishes on the database. You want to remove pizza from the list(Don't think anyone would do that!), then you’ll use the delete operation. For that HTTP Delete method will be used.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

Try REST API Generation for Snowflake

DevOps for Private APIs. Automate the building, securing, and documenting of internal/private REST APIs with built-in enterprise security on bare-metal, VMs, or containers.

  • Auto-generated live APIs mapped from Snowflake database schema
  • Interactive Swagger API documentation
  • Scripting engine to customize your API
  • Built-in role-based access control

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay