What is a CRUD app and how to build one | Ultimate guideBy: Joe JohnstonJul 6, 2021 | 11 minutes readWe use CRUD apps every day. Most of the time, without noticing. They keep us organized, they help digitise business processes, and they’re critical to application development. But many of us are oblivious to what CRUD apps are, or how to build one. Within this post, I am to provide you with a simple and straightforward guide to the world of CRUD apps. The guide is broken down into three sections:What is a CRUD appHow to build a CRUD appWhy CRUD is importantWhat is a CRUD AppA CRUD app is a specific type of software application that consists of four basic operations; Create, Read, Update, Delete.At a high level, CRUD apps consist of three parts; the database, user interface, and APIs.DatabaseThe database is where your data is stored. A database management system is used to manage the database. There are several different types of database management systems (DBMS) that can be categorized by how they store data; relational (SQL), Document (NoSQL). If you are deciding what DBMS to choose for your CRUD app, hereâs a list of the 14 best database management systems . Going forward, our content will focus on SQL. SQL databases consist of tables. Tables consist of records. Records consist of fields. Fields consist of data.User InterfaceThe user interface (UI) is what your users interact with. Due to the increasing popularity of applications, businesses are now prioritizing user interface design and user experience.APIsFinally, the APIs are how your application informs your database of what functions to perform. These functions can be modeled in different ways but they are designed to perform four basic CRUD operations; Create, Read, Update, Delete.CRUD operationsAs previously mentioned, there are four basic CRUD operations; create, read, update and delete. These four operations map to functions/statements, as seen in the following table:OPERATIONSFUNCTIONSCreateInsertReadSelectUpdateUpdateDeleteDeleteEach letter in CRUD can also be mapped to an HTTP protocol method:OPERATIONSHTTP PROTOCOLCreatePostReadGetUpdatePutDeleteDeleteLetâs dive deeper into each of the CRUD operations. Weâve used a library management app as an example to help with learning.CreateCreate allows you to add new rows/records to a database/table. If the record does not exist, the create operation adds it to the database.Recipe exampleCreate/add a new book to our library management appReadRead is the operation that allows us to see the recipe we just created. It does not alter data. It simply displays it. Read consists of a function that queries our database and fetches all our records, in this case, recipes. We can tailor our queries to pull back all recipes, or only recipes of a particular type (for example,, vegan recipes). We can also pull back a single recipe if we have a UID (unique identifier).Recipe exampleView the books within our libraryUpdateUpdate is the operation that allows us to modify existing data and records within a table. We can update a single field within a record or multiple fields at once. It is also possible to update multiple records at once too.Recipe exampleUpdate a book’s availabilityDeleteDelete is the operation that allows us to remove records from a table.Recipe exampleRemove a book from our library management systemTwo additional basic CRUD app examplesRecipe appCreate - Add a new recipe to my recipe appRead - View recipes in my recipe appUpdate - Update the carbonara recipe in our recipe app to use guanciale instead of baconDelete - Remove the carbonara recipe from my recipe appProject management appCreate - Insert a new task in your project management toolRead - View all open tasksUpdate - Mark a task as âcompleteâDelete - Remove a task from your project management appCRUD app ideasIf you want to get started and work on CRUD app ideas, this section provides you with some inspiration.In general, whenever you see data storage there is potential for a CRUD app. From something as simple as a to-do list to complex software and apps.CRUD use casesThere are several use cases for CRUD apps, including:Event management app,Student portal,Sports club membership app,Book club app,Content marketing calendar,OKRs app,To-do app,Project management app,Applicant tracking system.What are CRUD projects?You can create CRUD projects in any application that requires data storage. They can range from a simple standalone table to complex projects with hundreds of interlinked tables.Another interesting aspect is that many daily tasks are based around CRUD software even if users donât realize it. For example, a spreadsheet containing your monthly finances uses CRUD operations.That is, you can create, read, update and delete data from it.CRUD platforms / frameworks / tech stacksThere are many, low code platforms, frameworks, or tech stacks that provide an effective workflow when creating CRUD apps. The following are options you might consider:BudibasePython and DjangoLAMP - Linux, Apache, MySQL, PHPSupabase and Next.jsMEAN - Mongo, Express, Angular, Node.jsHow to build a simple CRUD appBudibase is a low code platform that is designed for creating CRUD applications. From the frameworks, tech stacks, and platforms listed above, Budibase is the easiest and fastest way to build a CRUD application. For these reasons, we will use Budibase to build our CRUD app.OverviewA local library is currently using an spreadsheet to manage their catalogue of books, and they would like to upgrade to a CRUD application.Our app must:Make it easier to add new booksMake it easier to search booksMake it faster to check the availability of booksImprove the experience when updating book information, including availabilityMake it possible to assign users to booksImprove the experience around deleting booksBuilding our library management CRUD appThere are three high-level steps to building our CRUD app; setting up Budibase, create our data structure, and designing our user interface.Setting up BudibaseIf you are new to Budibase, click the âGet startedâ button in the navigation (if on mobile, click the burger menu, then the âGet startedâ button). Once you have Budibase setup, follow the actions below:Actions:Click the âCreate new appâ button.Give your app a name. We are going to call our app the âLibrary management appâ - very original.Create your data structureBudibase has its own database and supports several others; including MySQL, PostgreSQL, Mongo, and more. For our CRUD app, we will simply use Budibaseâs internal database - Budibase DB.Actions:Create a Budibase DB table, and call it âBooksâCreate a column within your Books table, and fill out the form:Name - TitleType - TextSelect âPrimaryâ under search indexesCreate another column within your Books table, and fill out the form:Name - AuthorType - TextSelect âSecondaryâ under search indexesCreate another column within your Books table, and fill out the form:Name - StatusType - OptionsOptions 1 - AvailableOptions 2 - Not availableCreate another column within your Books table, and fill out the form:Name - Checked out byType - RelationshipTable - UsersDefine the relationship - One Users row -> many Books rowsColumn name in other table - BooksThatâs our database and table structure setup. Now letâs add a few records for testing purposes:Click âcreate rowâComplete the form:Title - SuperfreakonomicsAuthor - Stephen DubnerStatus - AvailableChecked out by - leave blankClick ‘save’Click âcreate rowâComplete the form:Title - Burning BrightAuthor - John SteinbeckStatus - Not availableChecked out by - leave blankClick ‘save’Click âcreate rowâComplete the form:Title - Electric UniverseAuthor - David BodanisStatus - AvailableChecked out by - leave blankClick ‘save’Click on the Design tab (in the top navigation bar)Designing your user interfaceThe design section is where we create our User Interface. You will notice on the left-hand side of your screen, there is a list of screens/routes and components. These screens were autogenerated by Budibase. Budibase is smart enough to know that for each Budibase table you create, you will need a new, list, and detail screen, in other words, a create (new), read (list), update + delete (detail) screen. This makes it faster and easier to build CRUD apps. Letâs get started.Actions:Click the books/:id screenClick âField groupâIn the settings panel, click âUpdate form fieldsâThis should generate a form, with record details in it, and will allow us to update and delete individual records.Click the books/new/row screenClick âField groupâIn the settings panel, click âUpdate form fieldsâThis should generate a new form for adding new booksAdding searchClick on the âContainerâ component under /booksAdd a form component (located within the component panel ((above the main screen))Drag the âData Providerâ component (with children) inside the âNew Formâ componentClick on the âNew Formâ componentIn the settings panel (right panel), select the Schema dropdown, and select BooksUnder Theme, select âLightestâAdd a Text Field component (under Form in the component panel)Drag the text field component above the data provider component (and nested under ‘New Form’)In the settings panel, click the âFieldâ dropdown and select Title.In the âPlaceholderâ textbox, add a placeholder - we will use âSearch titleâ.Find the âMarginâ section and change âBottomâ to â20pxâ.Click the âdata providerâ component in your left nav panelClick âDefine FiltersâClick âAdd expressionâIn the first dropdown, select ‘Title’In the second dropdown, select âStarts withâIn the third dropdown, select âBindingâAnd in the fourth input, click the little lightning boltA new drawer will appear. Select the âNew Form.Fields.Title’ option under âColumnsâ, and click âSaveâClick âSaveâ again (to save your new filter)Youâve successfully added search and we now have our final CRUD app that will:Make it easier to add new booksMake it easier to search booksMake it faster to check the availability of booksImprove the experience when updating book information, including availabilityMake it possible to assign users to booksImprove the experience around deleting booksAnd believe it our not, thatâs us finished. Well done! Click the preview button (play icon) to view your CRUD app, or click Publish to push it live. Click the Books link, and there is your table with search.Tip - if you click the Books screen, and change the route to ‘/’ it will reroute to your homepage.Why CRUD is importantThe CRUD acronym is a great, memorable framework for building applications and constructing usable models. We can examine why CRUD is essential from two fronts; developers and end-users.For developers, CRUD operations are essential to app development. In a similar vein, REST, a superset of CRUD, is necessary for website development.For end-users, CRUD operations allow them to fill out forms, edit data, manage their admin panels and user settings.CRUD offers many other benefits including:Security controlIt is more performant vs. SQL statementsItâs tried and testedItâs a recognized pattern and recognizable by most devsIt simplifies the process and provides an easy framework for new developers to learnCRUD Software and alternativesCRUD means Create, Read, Delete, Update. From this definition, it’s clear that CRUD is closely related to databases and data storage. CRUD is the simplest form to interact with tables and documents, and it provides you with a representation of the database itself as it is.This means that any app that uses these methods is CRUD software. This begs the question, are there other ways to interact with data?By definition, CRUD itself is limited to primitive operations. But you can do other operations to aggregate, manipulate and represent data in completely different ways.For example, CRUD software can provide you with ways to interact with each individual table within a database. Alternatively, you could create REST API endpoints or even app screens that load all consituent tables in one place.Therefore, you can spice up your CRUD software with additional methods that arenât just pure CRUD.Check out our ultimate guide to data sources to find out more.CRUD app templatesYou can find over 50 CRUD app templates on the Budibase template page. These templates are free, 100% customizable, and simple to install.View Budibase templatesAnd thatâs the wrap. I hope you found value within this post and your understanding of what a CRUD app is and how to build one has improved. I wish you all the best on your development journey.