CRUD Behaviour Overview
By Nicola D'Andrea and Christine Chien 27 August 2020 Codebots Basics
CRUD is an acronym that stands for Create, Read, Update and Delete. The CRUD behaviour is used for management of structured data. Use cases may include managing users, bookings or events, or any data that can be displayed in a spreadsheet.
Quickly model and prototype CRUD/database applications on Codebots. Signup and start modelling your app for free.
What is CRUD?
The CRUD behaviour is used for management of structured data. Use cases may include managing users, bookings or events, or any data that can be displayed in a spreadsheet.
CRUD is an acronym that stands for Create, Read, Update and Delete. Read is often also referred to as list or retrieve, and Update is interchangeable with edit or modify. These four actions represent the basic functions of persistent storage (i.e. storing data, usually in a database).
To understand how CRUD works, see the interactive prototype.
Default CRUD includes:
Accessing a list of data
Creating, reading, updating and deleting data
Sorting and filtering data
Using Codebots protected regions, CRUD can be customised to include:
Different displays using a custom view
CRUD is not suitable for:
Displaying and managing unstructured data (such as Forms submission)
Items are retrieved and displayed within this view as a list. Options to be performed against each item are available to the right.
In both this view and the Grid view (see below), results are paginated and can be filtered.
Selecting multiple items
At the top of the view, there are also options that can be applied to one or many items. In order to select these items, there is a check box on the left of each item row. The user can select each item individually, or check the Select All box at the top of the list to select every item in the list.
This is an alternate view for the entity's items. They are displayed as boxes in a grid and options are available at the bottom of each box.
Rather than moving through pages of results to find a particular item, the results can be filtered using the Filter functionality. The user has two options.
If the item can be found by entering a search term (e.g. name, description etc) then the user can type this term into the search bar at the top of the view. This will filter the results as the user types.
The second more targeted option is to open the Filter view and add more search parameters. The available fields in this view will be determined by how the entity has been setup in the Entity Diagram.
Although Delete is a separate action, it is performed through the List view. If enabled in the Entity Diagram, there will be an Delete button available on each item. If the user clicks that button they will be prompted to confirm they wish to proceed and if they continue the item will be removed from the application.
Removing multiple items is also available by checking the check box to the left of each item in List view (see Selecting multiple items above) then clicking the Delete Multiple button at the top of the view.
Create & Edit Views
The Create and the Edit views are similar in many ways. The main difference is that the user will either be creating an instance of an entity (booking, event etc) or editing one.