What is CRUD?

What is CRUD?

Patrick
·Mar 25, 2022·

2 min read

Subscribe to my newsletter and never miss my upcoming articles

Play this article

We interact with the CRUD application daily as part of our work. Maybe you record a task in your phone's calendar or take notes.

CRUD is the acronym for Create, Read, Update, and Delete. Any program's basic operations are known as CRUD.

The CRUD application consists of three key components:

  • Database
  • User interface
  • API or back-end system

The database is used to store data. A relational (SQL) or non-relational (NoSQL) database can be used. In most CRUD applications, relational databases are used. MySQL, MariaDB, PostgreSQL, and MS SQL are some of the most popular relational databases.

User Interface (UI) display data in a user-friendly format. With the user interface, the user makes API calls.

The API or back-end system communicates between the database and the user interface. It contains functions for performing CRUD operations.

Computer

CRUD operations

We know four different CRUD operations: create, read, update and delete. Each of these operations has its function in the SQL programming language.

CREATEINSERT
READSELECT
UPDATEUPDATE
DELETEDELETE

API requests can use different HTTP methods.

We know different HTTP methods such as POST, GET, PETCH, PUT, DELETE. Each letter of the CRUD can be associated with a specific HTTP method.

These are usually:

CREATEPOST
READGET
UPDATEPUT
DELETEDELETE

The create operation allows us to create new rows in the database.

The read operation retrieves data from the database. It can return different data to us, depending on the filters created.

The update operation updates the existing data in the table. We can update only one line in or even more lines at a time.

The delete operation allows us to delete a row in the database.

Some CRUD application ideas

  • To-Do list
  • library system,
  • account management system
  • notebook
  • contact manager

I hope you have got an idea of what CRUD is and how we use it daily.


You can start following me on Twitter, or you can buy me a cup of coffee☕ if you enjoy it.

Did you find this article valuable?

Support Patrick by becoming a sponsor. Any amount is appreciated!

See recent sponsors Learn more about Hashnode Sponsors
 
Share this