In this data basics article, I want to talk through the idea of CRUD, which stands for Create, Read, Update and Delete most systems that deal with data are CRUD applications.
It is most likely Developers who will be use the term 'CRUD' - but it is useful for everyone from Project Managers, Business Analysts and Business Users to understand what functional requirements systems often have when dealing with data.
Creating data is merely adding it where it didn't exist before. Good examples are adding a new item to your to-do list, submitting a new order to your favourite online shop or registering for an event. In each case, the system will create a new record with the relevant information
task: 'build a new rocket'
productName: 'Rocket Fuel'
eventName: 'Launch Party'
Reading the information you put into the system is essential. There are many different ways that info can be read. In most systems, you can access a single record by using its unique identifier (ID). You can also find many items that match a particular property. Examples of many things are, show me all red items, show me new orders from the last week or issues that we have flagged for review.
SELECT Dimensions, ScrewsNeeded
WHERE id = 'Galatic3000'
WHERE Color = 'Red'
WHERE isNeedUrgentReview = true
Updating content is vital to ensure that it is still relevant or any changes get reflected in the system. Usually, the system retrieves a record by its ID, and the contents are updated, and then it is resubmitted and overwrites the item that existed with that ID
SET status = 'complete'
WHERE id = 'jif7sfhj';
SET isHealthy = false, isLiability = 'veryMuchSo', ...
WHERE id = 'CrazyRocketGuy';
Delete is also fairly explanatory it will remove the record from the system. However, often, systems will update the record to show that it is no longer active without actually removing it. When required, the data will be deleted and gone forever (apart from backups!)
DELETE FROM IdeasTable
WHERE ideaName like 'rocket';