Datastore library for querying RDBMS and NoSQL databases