
A set of fundamental operations used to manage and manipulate data in a persistent storage system, such as a database. These operations are essential for most applications that interact with data, providing a structured way to handle data throughout its lifecycle. CRUD operations are often mapped to HTTP methods in RESTful APIs, facilitating integration between different systems and services.
Database Operations
CRUD operations are the basic actions performed on data in a database or other storage system. Each operation serves a specific purpose:
- Create: This operation adds new data to the system. In a database, it typically involves inserting a new row into a table.
- Read: This operation retrieves existing data from the system. In a database, it usually involves querying the database to select specific rows or columns from a table.
- Update: This operation modifies existing data in the system. In a database, it typically involves changing the values of one or more columns in a row.
- Delete: This operation removes existing data from the system. In a database, it usually involves deleting a row from a table.
RESTful API Methods
In the context of RESTful APIs, CRUD operations are often mapped to specific HTTP methods. This mapping allows applications to interact with data using standard HTTP requests, making it easier to integrate different systems and services:
- Create: POST
- Read: GET
- Update: PUT or PATCH
- Delete: DELETE
Table: HTTP Methods vs. CRUD Operations
| CRUD Operation | HTTP Method |
| Create | POST |
| Read | GET |
| Update | PUT or PATCH |
| Delete | DELETE |