SQL abstraction class.