Create, read, update and delete
From Wikipedia, the free encyclopedia
Create, retrieve, update and delete (CRUD) are the four basic functions of persistent storage, a major part of nearly all computer software. Sometimes CRUD is expanded with the words read or destroy.
Alternate initialisms for CRUD:
- ABCD: add, browse, change, delete
- BREAD: browse, read, edit, add, delete
- VADE(R): view, add, delete, edit (and restore, for systems supporting transaction processing)
[edit] Database applications
The acronym CRUD refers to all of the major functions that need to be implemented in a relational database application to consider it complete. Each letter in the acronym can be mapped to a standard SQL statement:
Create | INSERT |
Retrieve | SELECT |
Update | UPDATE |
Delete | DELETE |
Although a relational database is a common persistence layer in software applications, there are numerous others. CRUD can be implemented with flat text files, custom file formats, tape, or card, for example.
[edit] User interface
CRUD is also relevant at the user interface level of most applications. For example, in a software address book, the basic storage unit is an individual contact entry. As a bare minimum, the software must allow the user to:
- Create or add new entries
- Retrieve or view existing entries
- Update or edit existing entries
- Delete existing entries
Without at least these four operations, the software cannot be considered complete. Because these operations are so fundamental, they are often documented and described under one comprehensive heading, such as "contact management" or "contact maintenance" (or "document management" in general, depending on the basic storage unit for the particular application).