开发者

Audit Table DB Design : Does creating Audit Tables for Join Tables make sense

开发者 https://www.devze.com 2023-01-07 23:34 出处:网络
we are creating separate audit tables for those entity tables which need auditing using triggers on PostgreSQL 8.4.

we are creating separate audit tables for those entity tables which need auditing using triggers on PostgreSQL 8.4.

<Family> <Contact> <Family_Contact> <Address>

We have some join tables. Eg : Family_Contact is a join table.

Family has 1 or more than 1 contacts. Each contact has an Address. So, we have the following Table structure.

For auditing a Family, we need the following Tables which are duplicates of the above tables.

<Family_audit> <Contact_audit> <Family_Contact_audit> <Address_audit>

Family_Contact_audit is an AUDIT Join Table.

QUESTION : Does it make sense to make a separate AUDIT Table for the Join Tables开发者_开发技巧 ? Are there alternatives ? We will be using the Audit Tables for reporting purposes.

Thank you,


Yea they still make sense.

You could not track of the alterations made in family contact without an audit table to that particular table.

I don't see any other way that you could track changes and use, without creating these tables separately.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号