I have an app and a list of all the actions a user has done while using it.To put an example, for each user I have data like this:startcountry:aasession:0menu:mainmenu:playplay_level:1play_during:70 secondspurchase:metal hammerplay_level:2I have to choose a database where I could enter this kind of data, and they, in example, query all the players that bought the metal hammer before level 2.This is obviously not a SQL scenario and I have zero experience in NoSQL. I've been examining types of NoSQL databases (column, document, key-value, graph, ...) and I suppose that a key-value DB type is the one I should be using, but I'm not able to find if I can have duplicate keys, and if I can query for entries to appear before other entries (purchase xyz before play_level 2)Are key-value NoSQL databases able to handle this kind of data and query or should I choose another NoSQL database type?
Choose NoSQL database type
nosql
One can solve this by SQL as @Vincent said, e.g. by having a table with the following fields: userId: whatevertimestamp: DateeventName: stringparams: string or number, maybe multiple fields. NoSQL becomes relevant at this point. Here's some dummy example to start with, you should refine it though. SELECT u, e1, e2FROM users u, events e1, events e2WHERE e1.userId = u.userIdAND e1.eventName = 'play_level'AND e1.paramsNumber = 2AND e2.userId = u.userIdAND e2.eventName = 'purchase'AND e2.params = 'metal hammer'AND e2.timestamp < e1.timestampMaybe better if using LEFT JOIN, some GROUP BY would be necessay to prevent duplications (e.g. she played level 2 twice). Appropriate indexing (userId, eventName) can get better performance. BTW I'm using MongoDB in many projects, you can give it a try, it's not that difficult. But note that NoSQL could be your decision, not a functional requirement. 