diff --git a/source/includes/table-sql-to-mongo-schema-examples.yaml b/source/includes/table-sql-to-mongo-schema-examples.yaml index 4d6da3c80b4..bb6e50e8ad0 100644 --- a/source/includes/table-sql-to-mongo-schema-examples.yaml +++ b/source/includes/table-sql-to-mongo-schema-examples.yaml @@ -59,19 +59,41 @@ sql2: | ALTER TABLE users ADD join_date DATETIME mongo2: | - Collections do not describe or enforce the structure of the - constituent documents. See the :doc:`/core/data-modeling` - page for more information. + Collections do not describe or enforce the structure of its + documents; i.e. there is no structural alteration at the + collection level. + + However, at the document level, :method:`update() + ` operations can add fields to existing + documents using the :operator:`$set` operator. + + .. code-block:: javascript + :emphasize-lines: 1-5 + + db.users.update( + { }, + { $set: { join_date: new Date() } }, + { multi: true } + ) ref2: | - See :method:`update() ` and - :operator:`$set` for more information on changing the structure - of documents in a collection. + See the :doc:`/core/data-modeling`, :method:`update() + `, and :operator:`$set` for more + information on changing the structure of documents in a + collection. sql3: | .. code-block:: sql ALTER TABLE users DROP COLUMN join_date mongo3: | + Collections do not describe or enforce the structure of its + documents; i.e. there is no structural alteration at the + collection level. + + However, at the document level, :method:`update() + ` operations can remove fields from + documents using the :operator:`$unset` operator. + .. code-block:: javascript :emphasize-lines: 1-5 @@ -81,8 +103,10 @@ mongo3: | { multi: true } ) ref3: | - See :method:`update() ` and - :operator:`$unset` for more information. + See :doc:`/core/data-modeling`, :method:`update() + `, and :operator:`$unset` for more + information on changing the structure of documents in a + collection. sql4: | .. code-block:: sql