Esplora is a dependency of LDK. I think in the future bitcoin core will also be an option directly. Regarding the DB: I think best is to use an ORM that abstracts it away and gives again options on how to run it. The queries should be simple and compatible.