23
IMHO Redis is not for making structured querys(SQL) but for fast accesible data, what you could do is this: make a "table" with user_id as a key and the data is a list with friends, for example. Then you query for the user_id and process what you need. It's the opposite of normalization. If the order of data is importante, for example status updates, what you do is push and pop data into the lists. For example, the table "status" has user_id as key and the data is a list. You lpush data and then query the last 20 elements for example.