Persistence layer abstraction