A lot of grammar books say that with living things (a cat, a man), one can only use an -'s , for or double genitive so the only correct ways to say that a boy owns a hat are:
A boy's hat (apostrophe s)
A hat for a boy (for)
A hat of a boy's (double genitive)
And most books say also that "of" can be only used with inanimate objects, ex : the door of the house, the map of the garden...etc. So I came to understand that a clause like that is completely incorrect :
the computer of the family ❌❌❌
But like that it's correct:
the family's computer ✔✔✔✔
Then I discovered that "of" can also be used with animate objects, not just inanimate things, and that I can also use compound nouns.
So these two turned out to be correct:
the computer of the family ✔✔✔
the family computer ✔✔✔
But I'm wondering what are the differences in meaning between all of those ways to indicate possession, and whether all of them truly grammatically correct. If so, why do a lot of grammar books say that of is incorrect with living things like people or animals?
More importantly, are there any other ways to indicate possession other than the ones listed above?