extract database-object-with-id as a base class, add documentation