The acronym CRUD (Create, Read, Update, Delete) may be familiar to experienced programmers and UX designers, but most people who come across it may not fully understand what it means and how it relates to everyday websites and apps.
What is CRUD?
CRUD – again is:
- Create
- Read
- Update
- Delete
is shorthand for the basic functions that an application must conventionally be able to fulfill in order to be considered “complete.”
For example, let’s consider a basic phone book app. In order to feel like a “finished” application, the user should be able to do at least four things: create new entries, access the information available for each entry, modify and save the existing information, and remove old and unnecessary entries from the book. In this example, the phone book is essentially functioning as a database, and it’s no coincidence that the term CRUD is generally used to describe what an application with a database should conventionally do.
Because these four functions are so universal to programming, each of the elements of CRUD is represented in virtually every single programming language out there that deals with databases. A query language like SQL may call their Create function an INSERT, and a web application using HTTP may make a POST request, but both of these things are simply telling a database somewhere to produce a new entry. Same goes with reading, updating, and deleting items in a database – these are universal necessities, and although different languages may handle them differently, you can always be assured that any application dealing with a table of information will need to have these four key capabilities.
REST vs CRUD
If you’ve ever dabbled in developing a website or an app, it’s possible that you’ve come across another acronym that sounds awfully similar to what we’re describing with CRUD. REST (Representational State Transfer), or RESTful programming, is another term that deals with how a developer might deal with the manipulation of information coming into and out of a program. However, these two concepts deal with very different levels of programming and actually don’t compete against each other so much as complement one another.
CRUD, at its roots, is a basic and primitive way of manipulating information. It’s what an application pretty much HAS to be able to do, rather than a way of going about doing it. REST, on the other hand, is a high-level way of creating, changing and removing information for the user. Specifically, 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.
Hopefully, this has been an insightful look at what CRUD means to programmers, how applications might handle those functions, and what exactly the difference is between CRUD and REST when it comes to creating an application.