You say "code becomes less object-oriented" like it's a bad thing. Sure, being tied to a specific implementation of SQL is bad, but OO-structured code is not necessarily a good thing. If the interesting part about your app is the data, maybe your app should be structured like your data, rather than vice versa.