mvvm sql