C++ Database working with objects.