Strategies for working with items fed by a database

I am currently working on an integration of my solar water heating system. I store the values in a mysql db and would like to work with these values in OH.

Currently I only see the way of using the exec binding to set up the query for the latest item status. But isn’t there a more sophisticated way?

You could possibly write a small program or script that polls the database and publishes heating system values to MQTT topics. Or just publish to MQTT topics directly from your solar water heating system integration. Then of course use the MQTT item or event bus binding to subscribe to the MQTT topics to update items. You could then let openHAB persist the item states to MySQL at that point.