when i tried to run the script which inserts dates into myMovies collection with out actually creating the same , it executes and throws errors related to the document only like duplicate key error etc .Instead it should have stopped with the message collection does not exists?? How come Mongodb attempts to run it even with out the collection itself??
But as soon as i create the collection ,i could see all the documents available in compass. Please clarify