Feature/sql interface