use sqlite3 db to keep the mappings for better performance