Basic database API