-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
index.txt
271 lines (197 loc) · 8.71 KB
/
index.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
:template: product-landing
:hidefeedback: header
:noprevnext:
:orphan:
================
What is MongoDB?
================
.. meta::
:description: MongoDB Manual: documentation for MongoDB document databases.
.. introduction::
MongoDB is a document database designed for ease of application
development and scaling.
You can run MongoDB in the following environments:
.. include:: /includes/fact-environments.rst
.. button:: Get started with MongoDB Atlas
:uri: https://www.mongodb.com/cloud?tck=docs_server
.. include:: /includes/rapid-release.rst
.. image:: /images/hero.png
:alt: Homepage hero image
.. kicker:: What You Can Do
Work with your data in MongoDB
------------------------------
.. tabs::
.. tab:: Store and query your data
:tabid: store
.. procedure::
.. step:: Deploy MongoDB
Create a cluster in the {+atlas+} UI or the Atlas CLI
quickly and easily. To learn more, see
:atlas:`Create a Cluster </tutorial/create-new-cluster>`
in the {+atlas+} documentation
and :atlascli:`Get Started with Atlas
</atlas-cli-getting-started>` in the Atlas CLI
documentation.
For self-hosted deployments,
see :ref:`Replication <replication>` in the MongoDB manual
to create a replica
set.
.. step:: Connect to your deployment
Access deployments in the
{+atlas+} UI or connect with :driver:`drivers </>` or the
:mongosh:`MongoDB Shell (mongosh) </>` in the MongoDB
manual.
To learn more, see :ref:`Find Your Connection String <find-connection-string>` in the MongoDB manual.
.. step:: Insert, query, update, or delete documents
Perform CRUD operations in the {+atlas+} UI or by using the
MongoDB Query API - with or without transactions.
To learn more, see
:atlas:`Create, View, Update, and Delete Documents
</atlas-ui/documents/>` in the {+atlas+} documentation and
:ref:`MongoDB CRUD Operations <crud>` in the MongoDB manual.
.. step:: Model your data
Design your data schema to support frequent access patterns.
You can update or enforce your schema at any point.
To learn more, see :ref:`Data Modeling Introduction
<manual-data-modeling-intro>` in the MongoDB manual.
.. code-block:: javascript
➜ atlas setup
? Do you want to setup your Atlas database with default settings? (Y/n)
➜ Y
We are deploying Cluster9876543...
Please store your database authentication access details in a secure location.
Database User Username: Cluster9876543
Database User Password: abcdef12345
Creating your cluster... [Its safe to 'Ctrl + C']
.. tab:: Transform data with Aggregations
:tabid: transform
.. procedure::
.. step:: Import your data
Import data from a CSV or JSON file with database tools.
To learn more, see
:atlas:`Migrate or Import Data </import>` in the {+atlas+}
documentation and `mongoimport
<https://www.mongodb.com/docs/database-tools/mongoimport/>`__ in the database tools documentation.
.. step:: Aggregate your data
Use aggregation pipelines to process your data in multiple
stages and return the computed results. You can
preview the results at each pipeline stage when you
run aggregation pipelines in {+atlas+}.
To learn more, see :atlas:`Run Aggregation Pipelines
</atlas-ui/agg-pipeline>` in the {+atlas+} documentation
and :ref:`aggregation` in the MongoDB manual.
.. code-block:: javascript
test> db.orders.insertMany([
{ "item" : "almonds", "price" : 12, "quantity" : 2 },
{ "item" : "pecans", "price" : 20, "quantity" : 1 },
])
test> db.inventory.insertMany([
{ "sku" : "almonds", "description": "product 1", "instock" : 120 },
{ "sku" : "cashews", "description": "product 3", "instock" : 60 },
{ "sku" : "pecans", "description": "product 4", "instock" : 70 }
])
test> db.orders.aggregate([
{ $match: { price: { $lt: 15 } } },
{ $lookup: {
from: "inventory",
localField: "item",
foreignField: "sku",
as: "inventory_docs"
} },
{ $sort: { price: 1 } },
])
.. tab:: Secure access to your data
:tabid: create
.. procedure::
.. step:: Authenticate a client
Verify the identity of a user, replica set member, or
sharded cluster member with authentication.
To learn more, see :atlas:`Atlas UI Authenication
</atlas-ui-authentication>` in the {+atlas+} documentation
and :ref:`Authentication <authentication>` in the MongoDB
manual.
.. step:: Control access to your database
Enable Role-Based Access Controls to manage user privileges
on your entire database cluster or individual collections.
To learn more, see :atlas:`Atlas UI Authorization
</atlas-ui-authorization>` in the {+atlas+} documentation
and :ref:`Role-Based Access Controls <authorization>`
in the MongoDB manual.
.. step:: Encrypt your most sensitive data
{+csfle+} protects data while it is
in-use by the database. Fields are encrypted before they
leave your application, protecting them over the network, in
memory and at rest.
To learn more, see :ref:`Client-Side Field Level Encryption
<manual-csfle-feature>` in the MongoDB manual.
.. include:: /images/security.rst
.. tab:: Deploy and scale your database
:tabid: deploy
.. procedure::
.. step:: Create a cluster
Create a free cluster, an auto-scaling cluster, or a
serverless instance in the {+atlas+} UI. To learn
more, see
:atlas:`Choose a Cluster Type
</create-database-deployment/#std-label-ref-deployment-types>` in the {+atlas+}
documentation.
For self-hosted deployments, provide redundancy and
resilience for your database by deploying a replica set. To
learn more, see :ref:`Replication <replication>` in the
MongoDB manual.
.. step:: Scale out your database
Use sharding to horizontally scale your database or to
ensure location-based separation of data.
To learn more, see :atlas:`Shard a Collection
</atlas-ui/collections/#shard-a-collection>` in the {+atlas+}
documentation and :ref:`Sharding <sharding-introduction>`
in the MongoDB manual.
.. include:: /images/scaling.rst
.. kicker:: Related Products & Resources
Go Further with MongoDB
-----------------------
Explore libraries and tools for MongoDB.
.. card-group::
:columns: 3
:style: compact
.. card::
:cta: Learn about Drivers
:url: https://www.mongodb.com/docs/drivers/
:icon: atlas_drivers
:icon-alt: MongoDB Atlas icon
Use MongoDB in your application's language
.. card::
:cta: View Compass Docs
:url: https://www.mongodb.com/docs/compass/current/
:icon: mdb_compass
:icon-alt: MongoDB University icon
Visually explore your data with MongoDB Compass
.. card::
:cta: View Ops Manager
:url: https://www.mongodb.com/docs/ops-manager/current/
:icon: mdb_ops_manager
:icon-alt: MongoDB Server icon
Manage and monitor your deployments
.. toctree::
:titlesonly:
Introduction </introduction>
Installation </installation>
MongoDB Shell (mongosh) <https://docs.mongodb.com/mongodb-shell/>
CRUD Operations</crud>
Aggregation Operations </aggregation>
Indexes </indexes>
Atlas Search <https://www.mongodb.com/docs/atlas/atlas-search/?tck=docs_server_toc>
Atlas Vector Search <https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-overview/?tck=docs_server_toc>
Time Series </core/timeseries-collections>
Change Streams </changeStreams>
Transactions </core/transactions>
Data Modeling </data-modeling>
Replication </replication>
Sharding </sharding>
Storage </storage>
Administration </administration>
Security </security>
FAQ </faq>
Reference </reference>
Release Notes </release-notes>
Technical Support </support>