@@ -42,7 +42,7 @@ mongo1: |
42
42
status: "A"
43
43
} )
44
44
45
- However, you can also explicitly create a table :
45
+ However, you can also explicitly create a collection :
46
46
47
47
.. code-block:: javascript
48
48
:emphasize-lines: 1
@@ -59,44 +59,26 @@ sql2: |
59
59
ALTER TABLE users
60
60
ADD join_date DATETIME
61
61
mongo2 : |
62
- Update operations can add fields to all documents in a
63
- collection:
64
-
65
- .. code-block:: javascript
66
- :emphasize-lines: 1-5
67
-
68
- db.users.update(
69
- { },
70
- { $set: { join_date: null } },
71
- { multi: 1 }
72
- )
73
-
74
- Because each :term:`document` determines its own fields, a
75
- document may contain fields not contained by the other
76
- documents in the collection.
62
+ Collections do not describe or enforce the structure of the
63
+ constituent documents. See the :wiki:`Schema Design
64
+ <Schema+Design>` wiki page for more information.
77
65
ref2 : |
78
66
See :method:`update() <db.collection.update()>` and
79
- :operator:`$set` for more information.
67
+ :operator:`$set` for more information on changing the structure
68
+ of documents in a collection.
80
69
sql3 : |
81
70
.. code-block:: sql
82
71
83
72
ALTER TABLE users
84
73
DROP COLUMN join_date
85
74
mongo3 : |
86
- Update operations can remove fields from all documents in a
87
- collection:
88
-
89
- .. code-block:: javascript
90
- :emphasize-lines: 1-5
91
-
92
- db.users.update(
93
- { },
94
- { $unset: { join_date: "" } },
95
- { multi: 1 }
96
- )
75
+ Collections do not describe or enforce the structure of the
76
+ constituent documents. See the :wiki:`Schema Design
77
+ <Schema+Design>` wiki page for more information.
97
78
ref3 : |
98
- See :method:`update() <db.collection.update()>`
99
- and :operator:`$unset` for more information.
79
+ See :method:`update() <db.collection.update()>` and
80
+ :operator:`$set` for more information on changing the structure
81
+ of documents in a collection.
100
82
sql4 : |
101
83
.. code-block:: sql
102
84
@@ -129,8 +111,8 @@ mongo6: |
129
111
.. code-block:: javascript
130
112
:emphasize-lines: 1
131
113
132
- db.users.remove ()
114
+ db.users.drop ()
133
115
ref6 : |
134
- See :method:`remove () <db.collection.remove ()>` for
116
+ See :method:`drop () <db.collection.drop ()>` for
135
117
more information.
136
118
...
0 commit comments