How to select the element from database closest to my criteria

Hi there, I have a pretty specific question. Here it goes…

My database consists of these tables: users, characteristics and personas. The characteristics consist for example of “organized”, “adventurous”, “materialistic”, “noble”, … The personas on the other hand consist of words like “architect”, “logician”, “entertainer”, “entrepreneur”, …

Now in my web application I gather info on a user and add characteristics to the user profile. Now what I want to do in the end is to select the persona that has the most characteristics in common with what I know about the user.

Why only “the most” in common characteristics? Because I only have 16 personas and there are more combinations possible based on the gathered characteristics.

Hope anyone can help out :slight_smile: