Best practice to track changes

Hello,

What is the best practice to track changes in mongoDB? In relational database, we normally have extra columns(createTimestamp, updateTimestamp, userId) in each table, so that we know who/when/what the change is done for each table.

Thanks in advance.

Hi @mike_zenon ,

The best way to actively track changes is by using change streams:

Now indexing and query a last modified field as you used to do in RDBMS is also valid but less convenient.

Thanks