First attempt of database layer abstraction