Anatomy of a CRUD App

Microsoft Access is a great platform for developing desktop CRUD apps. But what the heck is a CRUD app?

Anatomy of a CRUD App

The sweet spot for Microsoft Access is in building desktop, data-heavy applications.  Data-heavy applications are often referred to as "CRUD apps." That's not because they're cruddy.  

CRUD is an acronym for Create, Read, Update, Delete.  Those four operations comprise the core of a data-heavy application.

Let's discuss each operation briefly.

Create

These are all the processes that support adding new data to the application.  

These processes fall into two broad categories:

  1. Adding individual records
  2. Adding records in bulk

Read

This operation does a lot of heavy lifting.  Most data-heavy applications derive the bulk of their value from their ability to present data in interesting and useful ways.

The "Read" operation manifests itself in many different ways:

  1. Finding data
  2. Analyzing data
  3. Generating printed reports
  4. Exporting data to other applications

Update

These are all the processes that make changes to existing data.

They fall into the same two broad categories as the Create operation:

  1. Editing individual records
  2. Editing records in bulk

Delete

These are the processes used to remove (or hide) data from the application.

There are two basic ways to "delete" records in an application:

  1. Physically removing them from disk (i.e., a SQL DELETE)
  2. Setting a flag to indicate that a record has been marked as deleted

Mapping to SQL Commands

There is a general correlation between CRUD operations and SQL commands:

  • Create => INSERT INTO
  • Read => SELECT ... FROM
  • Update => UPDATE ... SET
  • Delete => DELETE FROM

There are exceptions to this rule.  For example, to implement the Delete operation you can use the DELETE FROM SQL command OR you can use something like UPDATE ... SET DeletedAt = Now().

Image by StockSnap from Pixabay

All original code samples by Mike Wolfe are licensed under CC BY 4.0