DEV Community

Kaniz Mokammel Mim
Kaniz Mokammel Mim

Posted on

CRUD Operations…

CRUD Operations…

Everything that contains information or images on a website is stored in a database.The method by which we do this is called CRUD Operations. CRUD is an acronym.
Here,C stands for create , R stands for read , U stands for update , D stands for delete.These are the four most basic operations in database systems. CRUD operations are the backbone for interacting with any database.There are many databases where we can store data, some of which I will mention below:
Oracle 12c, MySQL, Microsoft SQLServer, PostgreSQL, MongoDB, MariaDB, DB2, SAP HANA. Today I will discuss MySQL and mongoDB.

MySQL : MySQL is an open-source relational database management system.
MySQL is one of the most popular databases for web-based applications. It's free for the user.Here SQL means Structured Query Language. SQL is a language programmers use to create, update ,read and delete from the relational database, and also control user access to the database. If a user wants to use a MySQL database s/he has to set up XAMPP, without XAMPP any can not use a local server.

Image description

This is an inner look of MySQL. Here any one can create tables for storing data or information.
In SQL this process is used to Insert data.

Image description
Here * means get all data from the database.

Image description
This query use to update a data

Image description
And this one for delete data.

Image description

MongoDB: MongoDB is a document database.The main purpose of making MongoDB is designed to make scaling easier.MongoDB documents are similar to JSON objects. So it is easy to access the API . MongoDB has both local and cloud-hosted deployment. It is also free for all. MongoDB is a tool that can manage document-oriented information, store or retrieve information. MongoDB is a NoSQL database management program. Here NoSQL databases are useful for working with large sets of distributed data. This is the inner look of MongoDb.

Image description
CRUD operation using MongoDB
InsertOne is used to add new data in the database.
.
Image description
updateOne is used to update or change an existing data in the database.

Image description
Find use to search a data from database

Image description

DeleteOne is used to delete a specific data from a database realtion.

Image description

Top comments (1)

Collapse
 
sabbir185 profile image
Sabbir Ahmmed

Well written, Carry on...