Using set instead of dictionary in db population script