You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/fundamentals/databases-collections.txt
+64-20Lines changed: 64 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,6 @@
2
2
Databases and Collections
3
3
=========================
4
4
5
-
.. default-domain:: mongodb
6
-
7
5
.. contents:: On this page
8
6
:local:
9
7
:backlinks: none
@@ -14,23 +12,25 @@ Overview
14
12
--------
15
13
16
14
In this guide, you can learn how to use MongoDB databases and
17
-
collections with the MongoDB Kotlin driver.
15
+
collections with the MongoDB Kotlin driver.
18
16
19
17
MongoDB organizes data into a hierarchy of the following levels:
20
18
21
19
#. **Databases**: Databases are the top level of data organization in a MongoDB instance.
22
20
23
21
#. **Collections**: Databases are organized into collections which contain **documents**.
24
22
25
-
#. **Documents**: Documents contain literal data such as strings, numbers, and dates, as well as other embedded documents. For more information on document field types and structure, see the :manual:`server documentation for documents </core/document/>`.
23
+
#. **Documents**: Documents contain literal data such as strings, numbers, and dates, as well as other embedded documents. For more information on document field types and structure, see the :manual:`Server documentation on documents </core/document/>`.
26
24
27
-
With the MongoDB Kotlin driver, data can be modeled using Kotlin data classes or you can use a
28
-
`Document <{+api+}/apidocs/bson/org/bson/Document.html>`__ class
29
-
to store and retrieve data from MongoDB.
25
+
With the MongoDB Kotlin driver, you can model data by using Kotlin data
26
+
classes or by using the `Document
27
+
<{+api+}/apidocs/bson/org/bson/Document.html>`__ class to store and
28
+
retrieve data from MongoDB.
30
29
31
-
.. TODO:(DOCSP-29224): add back in when document data format data classes are documented
32
-
.. To learn more about using data classes to store and retrieve data, refer to
33
-
.. :ref:`Document Data Format: Data Classes <fundamentals-data-classes>`.
30
+
To learn more about using data classes, see
31
+
the guide on the :ref:`Data Class Data Format
32
+
<fundamentals-data-classes>`. To learn more about using the ``Document``
33
+
class, see the guide on the :ref:`Document Data Format <kotlin-document-format>`.
34
34
35
35
Access a Database
36
36
-----------------
@@ -40,7 +40,7 @@ Use the `getDatabase()
40
40
a ``MongoClient`` instance to access a ``MongoDatabase`` in a MongoDB
41
41
instance.
42
42
43
-
The following example accesses a database named "testDatabase":
43
+
The following example accesses a database named ``testDatabase``:
0 commit comments