DEV Community

Cover image for What is a CRUD?
Arowolo Ebine
Arowolo Ebine

Posted on

What is a CRUD?

In this my concise article, you will understand the different between CRUD and RESTFul API.

When building an API, we want our model to provide four basic functionalities which are the four major functions
used to interact with database applications in which we refer to as create, read, update, and delete
resources known as CRUD. This CRUD is essential operations needed in building an endpoint API.

RESTful APIs most commonly utilize HTTP requests. Four of the most common HTTP methods in a REST environment are GET, POST,
PUT, and DELETE, which are the methods by which a developer can create a CRUD system.

Create: Use the HTTP POST method to create a resource in a REST environment
Enter fullscreen mode Exit fullscreen mode
Read: Use the GET method to read a resource, retrieving data without altering it
Enter fullscreen mode Exit fullscreen mode
Update: Use the PUT method to update a resource
Enter fullscreen mode Exit fullscreen mode
Delete: Use the DELETE method to remove a resource from the system
Enter fullscreen mode Exit fullscreen mode

NAME        DESCRIPTION                                                                 SQL EQUIVALENT
Create      Adds one or more new entries.                                               Insert
Read        Retrieves entries that match certain criteria (if there are any).           Select
Update      Changes specific fields in existing entries.                                Update
Delete      Entirely removes one or more existing entries.                              Delete
Enter fullscreen mode Exit fullscreen mode

Top comments (0)