Abstracted database access layer