One interesting feature of Mongodb is its ability to create a database/collection on the fly by simply running a code like this:
db.store.save({a: 789});
When executing this code, Mongodb automatically creates the store
collection and adds a document to it without any explicit setup.
According to my understanding of JavaScript, calling a method on an undefined property of the db
object should result in an error or exception. However, that doesn't seem to be the case with Mongodb's dynamic creation of collections.
I am intrigued by the inner workings of this process and would appreciate any helpful links or resources for further exploration. My attempts at Googling for information have not yielded much insight so far.