CRUD is an acronym for Create, Read, Update, and Delete, the four fundamental operations of data storage. Computer scientists use CRUD as a measure of an application’s completion state. If an application can’t perform CRUD operations, it is incomplete.
Let’s say we’re building a web business that sells socks. When a customer visits our website, we want to provide up-to-date inventory information.
What about CRUD in the age of microservices, where applications exist on multiple containers across multiple databases? Is it outdated? Not at all! Perhaps you’ve heard of REST in your programming journey. The relationship between REST and CRUD can be confusing, but we’re here to help.
The REST (REpresentational State Transfer) protocol was designed to standardize HTTP communication between clients and servers. REST is a system of rules and connectors all services must follow and use. If you’ve ever had to order a special dongle for that one piece of hardware without a USB connector, you understand the problem that REST solves.
So, if we’re manipulating data on a database with REST, it’s the same as CRUD, right? Not quite.
REST refers to manipulating data through HTTP commands, and an ideology for how to streamline the relationship between the data that a user is manipulating on screen and the information that is saved on the server. A programmer can create a REST API that handles basic CRUD functions, but building a CRUD application in no way insinuates the use of RESTful programming.
It’s easy to confuse CRUD and REST operations because their operations are roughly analogous to each other, but if you remember that REST is a set of standards, and CRUD is a set of functions, you’ll be on your way to a deeper understanding.