ER-to-relation mapping of ternary or any other highest-studies matchmaking