How does the backup works in MongoDB?
Category: MongoDB
MongoDB initial backup
Initial backup overview.
MongoDB Monitoring
Below are some screen shots to understand the monitor, better.
MongoDB Query Documents
SQL to MongoDB Mapping
Terminology and Concepts
SQL Terms/Concepts | MongoDB Terms/Concepts |
---|---|
database | database |
table | collection |
row | document or BSON document |
column | field |
index | index |
table joins | $lookup , embedded documents |
primary keySpecify any unique column or column combination as primary key. | primary keyIn MongoDB, the primary key is automatically set to the _id field. |
aggregation (e.g. group by) | aggregation pipelineSee the SQL to Aggregation Mapping Chart. |
SELECT INTO NEW_TABLE | $out See the SQL to Aggregation Mapping Chart. |
MERGE INTO TABLE | $merge (Available starting in MongoDB 4.2)See the SQL to Aggregation Mapping Chart. |
UNION ALL | $unionWith (Available starting in MongoDB 4.4) |
transactions | transactions |
Executables
MongoDB MySQL Oracle Informix DB2
Database Server mongod
mysqld oracle IDS DB2 Server
Database Client mongo
mysql sqlplus DB-Access DB2 Client
Create, Alter and Drop
Insert
Select
Update Records
Delete Records
MongoDB Collection
You can create a collection (Table) using the command line or GUI.
Here we hit the first error.
As you can see in the above error. You can’t create under the ‘admin’.
You can insert the data into collection (table) from json or csv etc.
Never to miss some important points here.
If you note it carefully from the below screenshot, you will notice that a collection(table) can be export (as you can see the arrow below 1. marked red) and even can import file or document. As already said you can import the data from csv or JSON too.
Below screenshot reminded me about the MySQL database. That also got the same options.
MongoDB Connect to app
In order to connect to the application launch the connector (2nd option).
Select the driver and version.
You can select the ‘DRIVER’ and ‘VERSION’. There are multiple drivers for example I select ‘Python’.
MongoDB Shell
Clock the first option (Connect with the mongo shell).
You can download the Mongo Shell.
MongoDB compass
At a glance, please make sure to have a look on red marked.
MongoDB compass
Once you download the compass file and launch it. Below is the journey through screenshots.
What all you can do with MongoDB Compass
After you connect.
At the time of launch it will show the privacy setting.