I have a set of hierarchical data to store, the hierarchy is like site/building/floor, the data, for example
{
site:\'New York\',
buildings: [
In Redis you won't store your data in a unique data structure. You have to create multiple data structure, each one being identified by a key.
Use a convention to name yours keys: by example site:
will be a set that contains the list of building ids for a given site.
Then define hashes to store each building description. The key for these hashes could be something like: building:
In the hash you have 2 members: name and floors. Floors value is the unique id of the set containing the list of floor identifiers.
Then create a last set for each floor, to store the room names. The name of the sets could be something like: floor:
.
Tips: