The first thing you need to understand is Redis doesn't allow you to put a set in a set - no nested data structures. Likewise they are no vets and values in a set - only members which are strings in your case. This is why you can't "get the values".
It really sounds like the structure you are wanting is not a set but a hash. Using a hash will allow you do do exactly what you ask for.
hset family husband bob
hset family wife alice
And then to get what you call the values use hvals family
.
This is the proper way to do it as it uses the right data structure, matches your terminology to the structure, and provides exaxtly what you want led without the performance penalties of sort. Further it allows you to use the various hash commands to select or update specific members of the family.
You could also use hgetall
to use the mapping. That way your code knows Alice is the wife rather than the daughter.
Overall hashes are certainly the way to go here for virtually every reason.