Anatomy of a CRUD App
Microsoft Access is a great platform for developing desktop CRUD apps. But what the heck is 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:
- Adding individual records
- 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:
- Finding data
- Analyzing data
- Generating printed reports
- 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:
- Editing individual records
- 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:
- Physically removing them from disk (i.e., a SQL
DELETE
) - 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()
.