abstraction for db connection