sqlite storage of scan events