Convert Go structs into SQL relationships, and vice versa