🍪 TechCookies
HomeDSASystem DesignMy Progress
Free
Log inStart free
TechCookies — Practice · Learn · PrepareTechCookies — Practice · Learn · Prepare
ConceptsPracticeSD challengesPricingPrivacyTermsContact
© 2026 TechCookies
📚Append-Only Audit TablesFree
7 sections
~29 min total
26 quick quizzes
7 SD challenges linked
0 of 7 done·~30 min left
Concepts›Append-Only Audit Tables›What Is an Audit Table?
0 / 7
0%
7 sections~29 min
1
What Is an Audit Table?
Audit tables are append-only structures that log system actions.
ReadQuiz
~5 min
⋯
Why Audit Logs Must Never Be Updated — Only Inserted
Updating logs can lead to data tampering and loss of accountability.
ReadQuizCode
~5 min
⋯
Recording Every Attempt vs Only the Final State
Logging every attempt provides insights into failures and user behavior.
ReadQuizCode
~5 min
⋯
Partitioning Audit Tables by Date for Query Performance
Partitioning improves query performance by reducing data scan sizes.
ReadQuizCode
~5 min
⋯
Relevant System Design Questions
Designing audit logs involves understanding state transitions and user actions.
ReadQuizCode
~5 min
⋯
Quick Reference Cheat Sheet
A concise guide to audit table best practices and design patterns.
ReadQuizCode
~5 min
⋯
Practice test
26 questions
~9 min
Section 1 of 7ReadQuick quiz
What Is an Audit Table?
Audit tables are append-only structures that log system actions.
~5 min read
2 quick quizzes

Imagine a security camera in a bank. It records every single thing that happens — who walked in, who opened which drawer, what was moved, when. You can never erase that footage. It is a permanent record.

An audit table is the database version of that security camera.

It records every important action that happens in a system:

ActionExample
A user sends a notificationnotification_sent at 10:23 AM
A payment is attemptedpayment_attempted for ₹500
A search query is runsearch_run for "shoes"
A login happenslogin_attempted by user u_42

Key rule: You can only INSERT new rows into an audit table. You can NEVER UPDATE or DELETE existing rows.

This is what makes it "append-only."


☑ Quick check 1/2
What is the primary function of an audit table?
ATo update records
BTo delete records
CTo log actions
DTo summarize data
Answer the quiz to continue
Notes
🔍
Loading…