Skip to content

Update getting-started.txt #1034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions source/tutorial/getting-started.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The tutorial assumes that you're running MongoDB on a Linux or OS X
operating system and that you have a running database server; MongoDB
does support Windows and provides a Windows distribution with
identical operation. For instructions on installing MongoDB and
starting the database server see the appropriate :doc:`installation
starting the database server, see the appropriate :doc:`installation
</installation>` document.

.. contents:: This tutorial addresses the following aspects of MongoDB use:
Expand All @@ -27,7 +27,7 @@ starting the database server see the appropriate :doc:`installation
Connect to a Database
---------------------

In this section you connect to the database server, which runs as
In this section, you connect to the database server, which runs as
:program:`mongod`, and begin using the :program:`mongo` shell to
select a logical database within the database instance and access the
help text in the :program:`mongo` shell.
Expand All @@ -51,9 +51,9 @@ options.
Select a Database
~~~~~~~~~~~~~~~~~

After starting the :program:`mongo` shell your session will use the
``test`` database for context, by default. At any time issue the
following operation at the :program:`mongo` to report the current
After starting the :program:`mongo` shell, your session will use the
``test`` database for context, by default. At any time, issue the
following operation at the :program:`mongo` shell to report the current
database:

.. code-block:: javascript
Expand All @@ -63,13 +63,13 @@ database:
``db`` returns the name of the current database.

1. From the :program:`mongo` shell, display the list of
databases with the following operation:
databases, with the following operation:

.. code-block:: javascript

show dbs

#. Switch to a new database named ``mydb`` with the following
#. Switch to a new database named ``mydb``, with the following
operation:

.. code-block:: javascript
Expand All @@ -78,7 +78,7 @@ database:

#. Confirm that your session has the ``mydb`` database as context,
using the ``db`` operation, which returns the name of the current
database as follows:
database, as follows:

.. code-block:: javascript

Expand All @@ -96,7 +96,7 @@ for inserting data.
Display ``mongo`` Help
~~~~~~~~~~~~~~~~~~~~~~

At any point you can access help for the :program:`mongo` shell using
At any point, you can access help for the :program:`mongo` shell using
the following operation:

.. code-block:: javascript
Expand Down Expand Up @@ -126,14 +126,14 @@ Insert Individual Documents
~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. From the :program:`mongo` shell, confirm that the current context
is the ``mydb`` database with the following operation:
is the ``mydb`` database, with the following operation:

.. code-block:: javascript

db

#. If :program:`mongo` does not return ``mydb`` for the previous
operation, set the context to the ``mydb`` database with the
operation, set the context to the ``mydb`` database, with the
following operation:

.. code-block:: javascript
Expand All @@ -149,7 +149,7 @@ Insert Individual Documents
k = { x : 3 }

#. Insert the ``j`` and ``k`` documents into the collection
``things`` with the following sequence of operations:
``things``, with the following sequence of operations:

.. code-block:: javascript

Expand All @@ -159,7 +159,7 @@ Insert Individual Documents
When you insert the first document, the :program:`mongod` will
create both the ``mydb`` database and the ``things`` collection.

#. Confirm that the collection named ``things`` exists using
#. Confirm that the collection named ``things`` exists, using
the following operation:

.. code-block:: javascript
Expand All @@ -171,8 +171,8 @@ Insert Individual Documents
collection is ``things``. All :program:`mongod` databases also have
a :data:`system.indexes <<database>.system.indexes>` collection.

#. Confirm that the documents exist in the collection ``things`` by
issuing query on the ``things`` collection. Using the
#. Confirm that the documents exist in the collection ``things``, by
issuing a query on the ``things`` collection, using the
:method:`find() <db.collection.find()>` method in an operation that
resembles the following:

Expand All @@ -198,7 +198,7 @@ Insert Multiple Documents Using a For Loop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. From the :program:`mongo` shell, add more documents to the ``things``
collection using the following ``for`` loop:
collection, using the following ``for`` loop:

.. code-block:: javascript

Expand Down Expand Up @@ -240,7 +240,7 @@ Insert Multiple Documents Using a For Loop
.. _getting-started-cursor-exhaustion:

#. The :method:`~db.collection.find()` returns a cursor. To iterate
the cursor and return more documents use the ``it`` operation in
the cursor and return more documents, use the ``it`` operation in
the :program:`mongo` shell. The :program:`mongo` shell will exhaust
the cursor, and return the following documents:

Expand Down Expand Up @@ -275,7 +275,7 @@ For comprehensive documentation on cursors, see
Iterate over the Cursor with a Loop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. In the MongoDB JavaScript shell, query the ``things`` collection
1. In the :program:`mongo` shell, query the ``things`` collection
and assign the resulting cursor object to the ``c`` variable:

.. code-block:: javascript
Expand All @@ -293,8 +293,8 @@ Iterate over the Cursor with a Loop
The ``next()`` method returns the next document. The
``printjson()`` method renders the document in a JSON-like format.

The result of this operation follows, although if the
:doc:`ObjectId </reference/object-id>` values will be unique:
The result of this operation follows. Your
:doc:`ObjectId </reference/object-id>` values will be different.

.. code-block:: javascript

Expand Down Expand Up @@ -382,7 +382,7 @@ To query for specific documents, do the following:

db.things.find( { name : "mongo" } )

MongoDB returns one document that fits this criteria. The
MongoDB returns one document that fits this criteria. Your
:doc:`ObjectId </reference/object-id>` value will be different:

.. code-block:: javascript
Expand Down Expand Up @@ -426,7 +426,7 @@ To query for specific documents, do the following:


#. Query for all documents where ``x`` has a value of ``4``, as in the
previous query, but only return only the value of ``j``. MongoDB
previous query, but return only the value of ``j``. MongoDB
will also return the ``_id`` field, unless explicitly excluded. To
do this, you add the ``{ j : 1 }`` document as the
:term:`projection` in the second parameter to :method:`find()
Expand Down Expand Up @@ -484,7 +484,7 @@ For more information on querying for documents, see the
Limit the Number of Documents in the Result Set
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can constrain the size of the result set to increase performance by
To increase perfomance, you can constrain the size of the result by
limiting the amount of data your application must receive over the
network.

Expand Down