…not fret about joins and just use multiple queries?
I’d choose this approach.
- That’s exactly what you want: (a) One Author (-> query 1), (b) All books of that author (-> query 2). Done.
- I see no advantage from using a join for this use case. You would save one query (which would be fast anyway if the Name column is indexed and if the query uses no leading wildcard), but you would get the author’s name and ID replicated in every record of the result set (although you need the author info exactly once (for filling the Author struct)).