Skip to content

Commit 5023552

Browse files
author
Sam Kleinman
committed
publishing: SQL comparison charts
1 parent 57f4637 commit 5023552

File tree

6 files changed

+62
-49
lines changed

6 files changed

+62
-49
lines changed

source/contents.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ MongoDB Manual Contents
1818
use-cases
1919
faq
2020
reference
21-
sql

source/index.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,20 @@ MongoDB...
4343

4444
- **For Developers**
4545

46-
The task when building an application with MongoDB, is selecting
47-
a programming :doc:`language and driver
46+
The first task when building an application with MongoDB, is
47+
selecting a programming :doc:`language and driver
4848
<applications/drivers>`. Most of the drivers have their own
4949
tutorials; however, for all drivers you may want to understand a
5050
few core MongoDB concepts. The wiki's :wiki:`developer docs
5151
<Developer+Zone>` outlines these topics.
5252

53+
If you're familiar with database systems that use SQL, consider
54+
the following documents, which compare common MongoDB conventions and
55+
operations with their SQL equivalents:
56+
57+
- :doc:`/reference/sql-comparison`
58+
- :doc:`/reference/sql-aggregation-comparison`
59+
5360
Of the developer docs, those covering CRUD (create, read, update,
5461
and delete) are particularly helpful:
5562

source/reference.txt

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,8 @@ Reference
77
MongoDB Interface
88
-----------------
99

10-
.. see:: The following interface overview pages:
11-
:doc:`/reference/operators` for an overview of all query, update,
12-
and projection operators; :doc:`/reference/meta-query-operators`
13-
for all special "meta" query operators;
14-
:doc:`/reference/aggregation` for all :doc:`aggregation
15-
</aggregation>` operators; :doc:`/reference/commands` for an
16-
overview of all :term:`database commands <database command>`; and
17-
the :doc:`/reference/javascript` for all :program:`mongo` shell
18-
methods and helpers
10+
Reference
11+
~~~~~~~~~
1912

2013
.. toctree::
2114
:maxdepth: 1
@@ -24,6 +17,30 @@ MongoDB Interface
2417
reference/command
2518
reference/method
2619

20+
MongoDB and SQL Interface Comparisons
21+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22+
23+
The following documents provide mappings between MongoDB
24+
concepts and statements and SQL concepts and statements.
25+
26+
.. toctree::
27+
:maxdepth: 1
28+
29+
reference/sql-comparison
30+
reference/sql-aggregation-comparison
31+
32+
Overviews
33+
~~~~~~~~~
34+
35+
For this reference material in another form, consider the following
36+
interface overview pages:
37+
38+
- :doc:`/reference/operators` for an overview of all query, update, and projection operators;
39+
- :doc:`/reference/meta-query-operators` for all special "meta" query operators;
40+
- :doc:`/reference/aggregation` for all :doc:`aggregation </aggregation>` operators;
41+
- :doc:`/reference/commands` for an overview of all :term:`database commands <database command>`; and
42+
- :doc:`/reference/javascript` for all :program:`mongo` shell methods and helpers.
43+
2744
.. _man-pages:
2845

2946
Architecture and Components

source/reference/sql-aggregation-comparison.txt

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
.. default-domain:: mongodb
2-
1+
==========================================
32
SQL to Aggregation Framework Mapping Chart
4-
------------------------------------------
3+
==========================================
4+
5+
.. default-domain:: mongodb
56

6-
With its :doc:`aggregation framework </applications/aggregation>`,
7-
MongoDB provides analogous functionality to common SQL aggregation
8-
functions.
7+
The :doc:`aggregation framework </applications/aggregation>` allows
8+
MongoDB to provide native aggregation capabilities that corresponds to
9+
many common data aggregation operations in SQL.
910

10-
The following table presents a quick reference of the various SQL
11-
aggregation terms, functions, and concepts and the corresponding
12-
MongoDB :ref:`aggregation operators
13-
<aggregation-pipeline-operator-reference>`:
11+
The following table provides an overview of common SQL aggregation
12+
terms, functions, and concepts and the corresponding MongoDB
13+
:ref:`aggregation operators <aggregation-pipeline-operator-reference>`:
1414

1515
.. include:: /includes/table-sql-to-agg-terms.rst
1616

1717
Examples
18-
~~~~~~~~
18+
--------
1919

2020
The following table presents a quick reference of SQL aggregation
2121
statements and the corresponding MongoDB statements. The examples in
@@ -39,8 +39,9 @@ the table assume the following conditions:
3939
{ sku: "yyy", qty: 25, price: 1 } ]
4040
}
4141

42-
- In the MongoDB statements, the fields of the :term:`documents
43-
<document>` in the collection ``orders`` are prefixed with ``$`` when
44-
they appear as operands to the aggregation operators.
42+
- The MongoDB statements prefix, the names of the fields from the
43+
:term:`documents <document>` in the collection ``orders`` with a
44+
``$`` character when they appear as operands to the aggregation
45+
operations.
4546

4647
.. include:: /includes/table-sql-to-agg-examples.rst

source/reference/sql-comparison.txt

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
.. default-domain:: mongodb
1+
============================
2+
SQL to MongoDB Mapping Chart
3+
============================
24

3-
SQL to Mongo Mapping Chart
4-
--------------------------
5+
.. default-domain:: mongodb
56

67
Executables
7-
~~~~~~~~~~~
8+
-----------
89

910
The following table presents a quick reference to the MySQL/Oracle
1011
executables and the corresponding MongoDB executables.
1112

1213
.. include:: /includes/table-sql-to-mongo-executables.rst
1314

1415
Terminology/Concepts
15-
~~~~~~~~~~~~~~~~~~~~
16+
--------------------
1617

1718
The following table presents a quick reference of the various SQL
1819
terminology and concepts and the corresponding MongoDB terminology and
@@ -21,7 +22,7 @@ concepts.
2122
.. include:: /includes/table-sql-to-mongo-terms.rst
2223

2324
Examples
24-
~~~~~~~~
25+
--------
2526

2627
The following table presents a quick reference of the various SQL
2728
statements and the corresponding MongoDB statements. The examples in
@@ -42,7 +43,7 @@ the table assume the following conditions:
4243
}
4344

4445
Create and Alter Table
45-
``````````````````````
46+
~~~~~~~~~~~~~~~~~~~~~~
4647

4748
The following table presents a quick reference of the various SQL
4849
statements related to table-level actions and the corresponding MongoDB
@@ -51,7 +52,7 @@ statements.
5152
.. include:: /includes/table-sql-to-mongo-schema-examples.rst
5253

5354
Insert into Table
54-
`````````````````
55+
~~~~~~~~~~~~~~~~~
5556

5657
The following table presents a quick reference of the various SQL
5758
statements related to inserting records into tables and the
@@ -60,7 +61,7 @@ corresponding MongoDB statements.
6061
.. include:: /includes/table-sql-to-mongo-insert-examples.rst
6162

6263
Select from Table
63-
`````````````````
64+
~~~~~~~~~~~~~~~~~
6465

6566
The following table presents a quick reference of the various SQL
6667
statements related to reading records from tables and the corresponding
@@ -69,7 +70,7 @@ MongoDB statements.
6970
.. include:: /includes/table-sql-to-mongo-select-examples.rst
7071

7172
Update Records in Table
72-
```````````````````````
73+
~~~~~~~~~~~~~~~~~~~~~~~
7374

7475
The following table presents a quick reference of the various SQL
7576
statements related to updating existing records in tables and the
@@ -78,7 +79,7 @@ corresponding MongoDB statements.
7879
.. include:: /includes/table-sql-to-mongo-update-examples.rst
7980

8081
Delete Records from Table
81-
`````````````````````````
82+
~~~~~~~~~~~~~~~~~~~~~~~~~
8283

8384
The following table presents a quick reference of the various SQL
8485
statements related to deleting records from tables and the

source/sql.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)