I'm a beginner with MongoDB and I've some questions:
When I'm connected to Mongo, and i execute
show dbsI see 2 databases:adminandlocal. What's their role? Then if I execute an insert command likedb.foo.insert({"value":"mongo"}), thetestdatabase appears. Why? How can i specify a custom name for a database?With
show dbsI get the databases (somehow likeshow databasesin sql), how can I then list the collections inside a database (I would useshow tablesin sql)?When executing a command, the MongoDB tutorial always uses the
dbobject. Is it the main object (a sort of "connection" object) that has to used for executing commands or it's something else?
Thanks!