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
![](http://www.sanjayshonak.co.uk/wp-content/uploads/2021/02/image.png)
![](http://www.sanjayshonak.co.uk/wp-content/uploads/2021/02/image-1.png)
Insert
![](http://www.sanjayshonak.co.uk/wp-content/uploads/2021/02/image-2.png)
Select
![](http://www.sanjayshonak.co.uk/wp-content/uploads/2021/02/image-3.png)
![](http://www.sanjayshonak.co.uk/wp-content/uploads/2021/02/image-4.png)
![](http://www.sanjayshonak.co.uk/wp-content/uploads/2021/02/image-5.png)
![](http://www.sanjayshonak.co.uk/wp-content/uploads/2021/02/image-6.png)
![](http://www.sanjayshonak.co.uk/wp-content/uploads/2021/02/image-7.png)
Update Records
![](http://www.sanjayshonak.co.uk/wp-content/uploads/2021/02/image-8.png)
Delete Records
![](http://www.sanjayshonak.co.uk/wp-content/uploads/2021/02/image-9.png)