database is made configurable(mongodb or tingodb)