Intelligent Database Triggers Enable Advanced Analysis of Data Recorded in Audit Logs
摘要
Traditional static database design accounting information system lacks a systematic audit trail mechanism, which makes it impossible to fully record data changes and operation history, and it is difficult to trace and analyze when problems occur. When using traditional data warehouses such as Oracle Data Warehouse, the data from multiple systems are incompatible when integrated, resulting in information islands in the audit process. This paper applies database triggers to automatically record and analyze operation logs to establish a more comprehensive and systematic audit trail mechanism. A more consistent and integrated audit mechanism is built so that information between different modules and systems can interact and form a complete audit chain. By designing an AuditLog audit log table, AFTER INSERT, AFTER UPDATE, and AFTER DELETE triggers in the database are created to write operation information into the audit log table. SQL query scripts are written to regularly analyze the data in the AuditLog table and count and filter abnormal operations. API interfaces are designed and ETL tools are used to integrate audit log data from different modules into a central database to achieve information sharing between modules. The research results show that after the implementation of the new audit trail mechanism, the integrity of the audit log is significantly improved, and the abnormal operation detection rate is as high as 1.07%, indicating that the system can identify and mark potential risk behaviors in real-time, enhancing the security and reliability of data. The user feedback survey results show that most users are satisfied with the system’s log integrity and anomaly detection functions, especially in providing complete operation history and accurate anomaly marking. However, the system still needs to be further optimized in terms of response speed and performance to improve user experience.