The most important rules of designing a Redis data model are: Redis does not support ad hoc queries and it does not support relations in the same way than relational databases. Thus, designing a Redis data model is a total different ballgame than designing the data model of a relational database. The basic guidelines of a Redis data model design are given as follows:
Instead of simply modeling the information stored in our data model, we have to also think how we want to search information from it. This often leads to a situation where we have to duplicate data in order to fulfill the requirements given to us. Don't be afraid to do this.
We should not concentrate on normalizing our data model. Instead, we should combine the data that we need to handle as an unit into an aggregate.
Since Redis does not support relations, we have to design and implement these relations by using the supported data structures. This means that we have to maintain these relations manually...