NodeJS Database abstraction