Simple DB wrapper and helper functions.