A simple class for connecting to databases