I'm playing around with Go and BadgerDB, which is an embedded disk based (not in-memory like Redis) key/value store. There's just so little information about how to use key/values stores in general.
My main question basically is: Does it make more sense to store one entity/object/item per key? Like this:
user:0 = {"email":"[email protected]","password":"some-hash"}
Or to store every field on its own? Like this:
user:0:email = "[email protected]"
user:0:password = "some-hash"
Does anyone have some experience with this? Does one technique have some performance advantages over the other? Or does one have management issues I don't think about yet? Or is there something else to consider?