Migrate DB connector from MySQLdb to SQLAlchemy, as well as fixes unicode insertion issue.