BaseDao class that manages connections