This is indeed a design issue.
Let’s not talk about redis first, let’s talk about relational databases first, which are generally based on table design, so they can support various queries, right?
So what should I do with NoSQL in general? Like mongodb's documented storage method, collections are similar to tables in relational databases and can also complete most of the query and indexing work.
What about redis? It is based on key-value. For example, what should you do if you want to query by id or name? The answer is to create an index yourself.
The most basic way is the object-type:id:field you mentioned above. Check student number 01: person:01.
This is indeed a design issue.
Let’s not talk about redis first, let’s talk about relational databases first, which are generally based on table design, so they can support various queries, right?
So what should I do with NoSQL in general? Like mongodb's documented storage method, collections are similar to tables in relational databases and can also complete most of the query and indexing work.
What about redis? It is based on key-value. For example, what should you do if you want to query by id or name? The answer is to create an index yourself.
The most basic way is the object-type:id:field you mentioned above. Check student number 01: person:01.