Create scan in database when performing scan