HiveBrain v1.2.0
Get Started
← Back to all entries
patternMajor

What is an audit table?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
audittablewhat

Problem

What are audit tables?

How are they useful?

I came across them reading this article.

Solution

One other important aspect of audit tables that hasn't been highlighted thus far, is that in addition to keeping track of who did what to which record (often including before and after snapshots) audit tables are write-once.

Records in an audit table may not be updated or deleted (see note), only inserted. This is sometimes imposed using triggers or maybe just application logic, but it's important in practice because it gives you "proof" that nothing's been tampered with in a way which is difficult to detect.

Note: Cleaning out old records from an audit table requires special processes which often have to be approved by management or auditors.

Context

StackExchange Database Administrators Q#15186, answer score: 30

Revisions (0)

No revisions yet.