Specifically, if I hold pointers I have to find a way to ensure that the dataset remains valid even if an update query is called or otherwise something else which alters the data, such as a script. I'm thinking of perhaps having 'connected' entity sets wherein any changes to the underlying data is instantly reflected in the set - otherwise a disconnected set doesn't change (eg: a snapshot of results). The issue of pointers vs handles becomes important again here, if I hold pointers the disconnected sets could reference invalid data . However if I provide handles, I'll need to provide an instance of my database class to each method/object to allow them to resolve the handle into real data.
Does anyone have any particular comments or ideas on this?
 Actually, the data will remain 'valid' as the pointers are stored in a shared_ptr, however the data itself could potentially not be registered within the database any longer and hence be considered invalid.