What's the best way to calculate similarity between rows in a table based on association?
- by André Pena
Suppose each Person has a collection of favorite Books.
So I have a table for:
Person
Book
The association between Person and Book (joint table for MxN)
I want to fetch the Persons that are similar to a Person1 based on the favorite Books overlaping. That is: The more books they have in common, the more they are similar.
I don't have to use only SQL to solve this problem. I could use programming also. I'm using SQL Server 2008 and C#.
What solution would you experts use?