Understanding CRUD Apps

CRUD is an acronym that stands for the four basic functions of persistent storage. Most applications you use daily (like Instagram, Amazon, or a To-Do list) are essentially CRUD Apps because they allow users to manipulate data in a database.

CRUD Apps

1. The Four Operations

  • Create: Adding new entries to the database (e.g., signing up for a new account).
  • Read: Viewing or searching for existing data (e.g., browsing your news feed).
  • Update: Editing existing information (e.g., changing your profile picture).
  • Delete: Removing data from the system (e.g., deleting a post).

2. CRUD vs. HTTP Methods

In web development (REST APIs), CRUD operations are mapped to specific HTTP verbs:

Operation HTTP Verb Description
CreatePOSTSubmits data to the server.
ReadGETRetrieves data from the server.
UpdatePUT / PATCHModifies existing data.
DeleteDELETERemoves data.

3. CRUD in Databases (SQL)

If you are working with databases like MySQL or PostgreSQL, you use these commands:

  • Create → INSERT
  • Read → SELECT
  • Update → UPDATE
  • Delete → DELETE

Knowledge Check

1. Which HTTP method is used for the "Create" operation?
A) GET | B) POST | C) PUT

2. In a social media app, "liking" a post (which changes the like count) is which operation?
A) Create | B) Read | C) Update

3. Which SQL command corresponds to the "Read" operation?
A) SELECT | B) INSERT | C) DROP