'MongoDB | understanding the logic behind the output of print(db.collection)
I'm working with MongoDB currently, and I'm trying to understand this output:
I created a DB called test and a collection called coll, and inputed this command:
print(db.coll)
it prints
test.coll
Which I know is the name of the DB and the collection. After I add documents to the collection, if I type into the shell db.coll
again, it still prints test.coll
. What I want to know, is whether it's still supposed to output only test.coll
even if I added documents.
What does print(db.coll)
actually mean?
Thank you in advance!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|