Skip to content

some wording and grammar changes to the DBRefs doc #23

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

Merged
merged 1 commit into from
May 10, 2012
Merged
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
20 changes: 11 additions & 9 deletions draft/applications/database-references.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ MongoDB applications use one of two methods for relating documents:

#. :ref:`Manual references <document-references>` where you save the
``_id`` field of one document in another document as a reference.
Then your application can run a second query to return the embeded
Then your application can run a second query to return the embedded
data. These references are simple and sufficient for most use
cases.

#. :ref:`DBRefs <dbref>` are a specification for relating documents
that captures the collection and database name. DBRefs are useful
when you may be emending documents from multiple collections, and
many :doc:`drivers </applications/drivers>` automatically resolve
documents embeded with DBRefs.
#. :ref:`DBRefs <dbref>` are a reference from one document to another using an
ObjectId and a collection and database specification for the target
document. Using DBRefs requires two queries, both of which aren't done on
the server side, but are something that some of the drivers can interpret.
DBRefs are useful when you may be emending documents from multiple
collections, and many :doc:`drivers </applications/drivers>` automatically
resolve documents embedded with DBRefs.

Unless you have a compelling reason for using DBrefs, use manual
references.
Expand Down Expand Up @@ -75,9 +77,9 @@ the ``places_id`` field in the ``places`` collection.
Use
~~~

For nearly every case you want to store a relationship between two
For nearly every case in which you want to store a relationship between two
documents, use :ref:`manual references <document-references>`. The
references are simple to create and application can resolve references
references are simple to create and your application can resolve references
as needed.

The only limitation of manual linking is that these references do not
Expand Down Expand Up @@ -156,7 +158,7 @@ Support
interface provides automatic resolution of DBRef objects.

**Perl**
The Perl driver contains no support for DBRefs, You can transverse
The Perl driver contains no support for DBRefs. You can transverse
references manually or use the `MongoDBx::AutoDeref
<http://search.cpan.org/dist/MongoDBx-AutoDeref/>`_ CPAN module.

Expand Down