chore(relationships): Move SQL logic into OO service