CRUD

KATHISH KUMARAN R
YavarTechWorks
Published in
4 min readJul 28, 2022

Hi Friends, In this blog we are going to learn about CRUD.

CRUD:

CRUD refers to the four basic operations a software application should be able to perform — Create,Read,Update and Delete.

Create

The CREATE function adds one or more entries and is the equivalent of the Insert function in SQL.

Read

The READ function retrieves data based on different criteria and is equivalent to the Select function in SQL.

Update

UPDATE procedures change and modify records without overwriting.

Delete

The DELETE function removes one or more entries that are specified.

In such apps, users must be able to create data, have access to the data in the UI by reading the data, update or edit the data, and delete the data.

In full-fledged applications, CRUD apps consist of 3 parts:

  • an API (or server)
  • a database, and
  • a user interface (UI).

The API contains the code and methods, the database stores and helps the user retrieve the information, while the user interface helps users interact with the app.

HTTP request methods

HTTP defines a set of request methods to indicate the desired action to be performed for a given resource.

Create = POST

The POST method submits an entity to the specified resource, often causing a change in state or side effects on the server.

Read = GET

The GET method requests a representation of the specified resource. Requests using GET should only retrieve data.

Update = PUT

The PUT method replaces all current representations of the target resource with the request payload.

Delete = DELETE

The DELETE method deletes the specified resource.

L and S: Additions to CRUD

CRUDL:

Sometimes CRUD is expanded to include LISTING (CRUDL). Listing helps with more extensive data not being stored in easy memory storage without going to pagination.

SCRUD:

Some programmers add an S to CRUD (SCRUD)for SEARCH. With data retrieval, it is only used for updates and deletions while users of software applications sometimes need to search data in a database to see a list of search results.

How is CRUD used for programming?

Let’s use a music database as an easy-to-understand example. In this example, we have a database that stores information for artists, albums, reviews, and genres. When programmers provide interactions with this database, the steps of CRUD are carried out as follows:

  • Create: A new artist is entered into the database. The program calling the function would supply values like “artist” or “band name”, which would be assigned a unique ID that could be referenced later.
  • Read: The new artist’s information is displayed to the user or programmer, powered by a function that simply calls up the entry from the database based on the unique ID.
  • Update: Artist information, such as notes and country of origin are added to the artist record. This would be powered by a function that allows for updates to an existing entry, prompting users to fill in those required fields.
  • Delete: If no albums or songs will be added for this artist, the artist can be deleted. Or, the artist record can be removed for other reasons (duplicate entry, lack of information, etc.).

In other words, without the four basic elements that comprise CRUD, an application or software cannot be considered complete (more complex needs may require even more elements to be complete).

Because these operations are so fundamental, they are often documented and described under one comprehensive heading. Depending on the basic storage unit for the particular application, some such heading names include:

  • Contact management
  • Content management
  • Contact maintenance
  • Document management

When you come across these terms while learning a programming language, you are dealing with CRUD.

Why CRUD is Important?

CRUD is frequently used in database and database design cases. Without CRUD operations, software developers can’t get anything done. REST, a superset of CRUD for HTTP resources, is used in website building, for example.

End-users, on the other hand, rely heavily on CRUD. It would be hard to register for websites, create blogs, or bookmarks without it. We can add or create new entries, search for and update existing ones, and delete them in most of the applications we use.

CRUD has a number of advantages, including:

  • It simplifies security control by meeting a variety of access criteria
  • It makes application design easier and more scalable by simplifying and facilitating it
  • When compared to ad-hoc SQL statements, it performs better

Conclusion:

In this Blog, we have learned a lot of fundamental things about CRUD. Hope to see you all in my next blog post, Until then Take Care! Keep Learning!

Thank You For Reading this Blog………

Have a Nice Day……

👋👋👋

--

--