completed database connection class