posted 9 years ago
Hi Subodh,
It has been a while since I reviewed the documents, but I believe the MongoDB documents say that a database will not be permanently created until you add data to it.
As such, a temporary database is defined as soon as a connection is established, or a database name is selected in the Mongo shell.
If you close the connection without adding any data, the temporary database will disappear.
Using the Mongo shell, you can see that with the show dbs command. No database in the name you chose will initially appear.
After you add data to that database, now that temporary database becomes permanent and the database you named will appear.
This way, MongoDB is automatically ready to go for data insertion as soon as a database name is chosen.
Cheers!
Chris