But in many cases this only provides a modest improvement as each UPDATE operation still requires a round-trip communication with the database server.In the case where the application server and database server are on different hosts, the round-trip will involve network latency as well.
and we could persuade the database server to apply those updates to the target table?
This is in fact entirely possible in many database systems.
So if the caller has a Postgre SQL database, and calls with data to represent our third example (where the target values are all unique), then the Postgre SQL-specific subclass will effect the updates using the table / UPDATE … To match on names we now need to match on two columns.
So whereas previously we specified the matching column using a scalar, when there is more than one column to match, we use an Array Ref.
If there is no database-specific subclass for the database in use, then will just use the base class which implements approaches that should work for any SQL database.