Reputation: 741
Usually in RDBMS we will have _Audit table for every table. For example.. table:Login columns: username, password, lastlogin,preference1,preference2 etc.
table: Login_Audit will have the values before got modified. This will have history of all the changes and will get purged once in 2 weeks or month. Usually the _Audit table entry will be made by triggers. columns: username, password, lastlogin,preference1,preference2 etc., modifiedby, modifiedtime
Just like _audit table in Rdbms, how to maintain who create the document, LastmodifiedUser, lastmodifiedtime.. etc. It should be fine if i can able to maintain these information in same collection itself.
Upvotes: 0
Views: 64
Reputation: 11671
MongoDB, at present (2.6), doesn't have any auditing features. There are auditing features in MongoDB Enterprise (i.e. these features aren't free). The auditing system tracks events like the following, on a per connection/user basis:
Upvotes: 1