Low-level database access class