The selecting is rather easy - you can use connector with render_sql - in render sql you can use any sql code which will allow the necessary dataset. If it can’t be done with sql - you can use any custom code to build an array of the data and user render_array command with such array.
Data updating may be a bit more problematic, but still relative easy. Connector provides a set of server side events, so you can assign a custom code for each type of operation ( update, insert, delete ).