Spring Data Repository Interface
Spring Boot – CRUD Operations
CRUD stands for Create, Read/Retrieve, Update, and Delete and these are the four basic operations that we perform on persistence storage. CRUD is data-oriented and the standardized use of HTTP methods or there is a term for this called HTTP action verbs. HTTP has a few action verbs or methods that work as CRUD operations and do note they are vital from a developmental point perspective in programming that also helps us relate better web development and also aids us while dealing with databases. In this article, we will be discussing the CRUD operations in Spring Boot, before that let us understand what are standard CRUD Operations:
- POST: Creates a new resource
- GET: Reads/Retrieve a resource
- PUT: Updates an existing resource
- DELETE: Deletes a resource
As the name suggests,
- CREATE Operation: Performs the INSERT statement to create a new record.
- READ Operation: Reads table records based on the input parameter.
- UPDATE Operation: Executes an update statement on the table. It is based on the input parameter.
- DELETE Operation: Deletes a specified row in the table. It is also based on the input parameter.
So in this article, we are going to perform some basic CRUD Operations by creating a Spring Boot Application and using the H2 Database. So, here is a brief explanation of What’s Spring Boot and What’s H2 Database.