SQL Terms/Concepts | MongoDB Terms/Concepts |
---|---|
database | database |
table | collection |
row | document or BSON document |
column | field |
index | index |
table joins | embedded documents and linking |
primary key
Specify any unique column or column combination as primary key.
|
In MongoDB, the primary key is automatically set to the_id field.
|
aggregation (e.g. group by) |
aggregation pipeline
|
SQL Terms, Functions, and Concepts | MongoDB Aggregation Operators |
---|---|
WHERE | $match |
GROUP BY | $group |
HAVING | $match |
SELECT | $project |
ORDER BY | $sort |
LIMIT | $limit |
SUM() | $sum |
COUNT() | $sum |
join | No direct corresponding operator; however, the$unwind operator allows for somewhat similar functionality, but with fields embedded within the document. |