Thanks for the note! We have new documentation in progress and we
will try to clarify the steps on the
http://www.mongodb.org/display/DOCS/Security+and+Authentication
page to make this more clear.
Reading shell source code is a great way to see ways of approaching
doing things. It isn't possible for the documentation to give
examples of everything that can be accomplished using JavaScript and
MongoDB's built-in functions, but if there is a command that "almost"
does what you want you may see how you can do it yourself by looking
at how the shell does the "almost right for you" thing. You probably
know that typing a function call but leaving off the parentheses at
the end will display the code for you.
> db.getSisterDB
function (name) {
return this.getMongo().getDB(name);
}
> db.getSiblingDB
function (name) {
return this.getMongo().getDB(name);
}
>
So you can see that db.getSisterDB and db.getSiblingDB do the same
thing. As Nat said, these functions gives you a way of referencing
another database directly.
-- Tad Marshall