A simple class for connecting to database