logging - Does this database audit approach have a down side -


I am preparing a database and want to know the audit for all changed values. I want to validate my viewpoint - if anyone can be under it, then I have already gone through existing questions and have tried something.

- (generated)

-> table name

-> timestamp

-> First Hashvarwala - Before all these changes will be all information, which comes with the key

How it will work :

-> Whenever a value changes, capture the entire row, encrypt and type in audit table

-> in the audit table in async mode Write- According to Async Mode I mean, a store of existing data is available Before enabling, if the transaction is successful, then feed it to the encryption and update table from some thread

-> Use the unique ID as the foreign key in the primary table; Store a comma separated strings

-> To get the value, get a historical value by asking the time table and the order of the order

-> Timeline Day Decrypt each row to get the

Pros:

-> I think it is very easy

-> The primary tables will not affect

-> There is no clutter in each table, the main tables need to store the foreign key only in the auditing row (I currently store the audit information with each table I am doing this

-> Multiple audits, a comma separated list can be maintained which can be used to achieve audit values ​​

< Strong> Something bad that I think is:

-> Encryption and decryption can take time

-> What about a very large object? For example text, blobs? How will encryption behave?

-> If audit is required in real time, then this can result in decrease in performance!

-> Logic is required to map it back to the Domain Model based table name

Given that:

There is no blob in my table, but there are 3k-4k words in the maximum text

Is there any major disadvantage with this approach?


Comments