generic function updates the records in
. If the instance is already associated with a database, that database is used, and
is ignored. If
is not yet associated with a database, a record is created for
in the appropriate table of
and the instance becomes associated with that database.