@Roy Nard If you are using Spring and it is a production project, I would not use Exposed but something like JPA or jdbi. There is an argument for Exposed in Ktor, but even then I personally don’t think it is production ready enough (I’m trying out Ebean with Ktor now).
If you want to switch from MySQL to Postgres, that shouldn’t be a huge problem with most ORMs etc. Switching to NoSQL would obviously be a bigger step, for that I would just make sure to have multiple layers of abstraction, so one class on a lower level which might be DB specific, but then a plain (data) class which is used for all logic etc. which is mapped from the lower level abstraction. Then you only need to switch out one layer and don’t need to touch all the logic etc.