handle mysql and sqlite on a case-by-case basis