SQL to MongoDB Mapping

Terminology and Concepts

SQL Terms/ConceptsMongoDB Terms/Concepts
databasedatabase
tablecollection
rowdocument or BSON document
columnfield
indexindex
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$outSee 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)
transactionstransactions

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