What is CRUD? CRUD stands for 4 English words: Create, Read, Update, Delete. CRUD is the 4 most important features to work with Database of a Website.
Assume that you have a News Website. So, what is CRUD in your News Website? Is CRUD a feature on Front-End, Back-End or Database? Why is CRUD interface required in the Website?
1. CREATE – Create New Post, Create New User
To create a new post, Website administrators will enter information from the HTML interface. Submit to Website server via HTML Form, process and store into Database.
The server will perform complex tasks like checking validity, checking duplicates, etc., and storing in the database a new article.
The CREATE feature in CRUD is simply the process of storing a new record on the Database. Also known as creating a new record on Database is CREATE in CRUD.
Example of CREATE feature in CRUD:
- The user who places an order on the E-commerce Website is also CREATE. E-commerce website creates orders on Database to store information of shoppers, products they buy, …
- Users post a comment on Facebook, Facebook must create a new data stream on their Database.
2. READ – Read Content of Posts, Read User Information, Read Order Information, View Products
In the CREATE feature, you have a new article stored in the Database. CREATE is a feature to create a new record on Database. READ feature will be the feature to view that record, also known as reading that record.
Understandably, READ is the time when a user views an article, views an information from Database. The interface will be displayed by you. The user sends a request to the server and views the article stored in the Database.
The READ feature in CRUD is the process of taking a record from the database. Also known as reading records from Database, see records from Database.
Example of READ feature in CRUD:
- Users click on the article link, based on that link, the server responds to a specific article. The article is read from Database and displayed by Website Developer.
- Users see product details, including product size, product price, …
- Users see the homepage of News Website. The entire article title, images are organized and displayed, which is READ in CRUD.
- Users surf Facebook’s New Feeds, which is READ from Database, the R – feature in CRUD.
3. UPDATE – Edit Post, Update Product Price, User Change Password
Update in CRUD is the update, update record information has been stored before. Absolutely no record creation, also known as new data stream.
Updating information in the Database will be based on a number of characteristics. Can be based on id, or common characteristics such as the same category, … Update data in Database can update one or more records, depending on the features of the Website.
Example of Update feature in CRUD:
- Website Administrator corrects the information of a previously created post.
- Website Users edit comments.
- Facebook Users edit posts.
4. DELETE – Delete Posts, Delete Comments, Delete Error Orders
Delete an existing record in the Database through the user interface. Deleting an existing user in the Database is the job of the Back-End Developer.
The DELETE feature in CRUD is to remove existing data, data created from CREATE.
In the actual Website Programming project, deleting user data through the interface is hidden. Hide user data so it can be recovered in case of need.
Example of the Delete feature in CRUD:
- Website Administrator deletes the post.
- Users delete their own comments.
- So, what is CRUD? CRUD is 4 main features for working with Database. Almost every feature on the Website is related to CRUD.
A simple feature on the Website can be CREATE with READ, CREATE and UPDATE. This depends on the logic of the feature and the project. See more about the actual CRUD at: https://namcoi.com/du-an/aptech-php-laravel-crud-user/public/users