DEV Community

Isabelly Arruda
Isabelly Arruda

Posted on

Native Auditing Architecture: Embedding Traceability Intelligence within the Database Core.

1. INTRODUCTION

In the current information systems landscape, ensuring data integrity and traceability is fundamental. In Relational Database Management Systems (RDBMS), data manipulation is predominantly performed through insert, update, and delete operations. However, Update and Delete operations are inherently destructive regarding historical data: by modifying or removing a record, the previous information is either overwritten or discarded.

In a standard transactional model without a preservation mechanism, the database reflects only the "current" state, making it impossible to track data evolution over time. This gap compromises information integrity and hinders forensic auditing and regulatory compliance. Historically, the most traditional approach to mitigating this risk has been the implementation of logs at the application layer. However, this architecture presents critical vulnerabilities: flaws in the application code or direct database access can result in changes that do not generate audit records, creating silent inconsistencies.

Given this scenario, this article proposes the adoption of Native Auditing. This concept is based on utilizing the database not merely as a passive repository, but as an active agent in historical preservation. The central proposal is to move traceability intelligence to the RDBMS core, using native PostgreSQL features—such as Triggers and the PL/pgSQL procedural language—to ensure an immutable audit trail resilient to external failures.

2. THEORETICAL FRAMEWORK

Top comments (0)