In Laravel can I create a relationship between 2 ids in the same table? In my case the hamming distance between 2 photos. I want to save the hamming_distance of every id to every other id. One for each relationship. No Dups. Not worried about scale or how long it takes to generate each hamming_distance. Really just looking for the best schema to handle this.
Photos Table
id
path
etc
Another table. Or whatever is suggested as 2 columns of the same name obviously will not work
photo_id
photo_id
hamming_distance