Test the db helper functions