Basic db functionality.