Angular service to handle table relationships