Is mongodb better to store data or directly?

  mongodb, question

For example, each piece of data needs the information of the relevant user. Do you want to store the user_id and get the latest user information every time you read it, or do you want to directly store the actual data of the user object?

Is time changing space or space changing time?

How do you usually operate?

If the user information will be updated, then the user_id must be saved, and then another acquisition (usually acquired when the user logs in and cooperates with redis to make storage calls) and the storage reading speed of mongodb must not be ignored, which is the advantage of mongodb. Personally, all my projects are stored separately by users and then called through user id. For reference only.