In a relational database model, should an audit table relate to all entities?

Asked

Viewed 92 times

2

The title already says it all, in a relational database model, an audit table, must have relationship with all entities I want to insert in the audit?

1 answer

2


Even considering this, a question that can lead to many opinions, I will leave my contribution.

My answer is Not !

Motives:

  1. Write access will be faster impacting as little as possible on your application as there will be no constraints validations
  2. Being an audit table, you will probably store data that has been deleted (depending on its implementation), this situation alone would make relations impossible.
  3. The indentation of information in this table will be done in a punctual way in situations of exception and not rule.
  4. Avoid excessive Locks in your application (Constraints checking can cause Locks)
  5. Any audit implementation that does not use references (constraints) am bank can be implemented more easily and quickly, including portable (this will depend on the technology you are using)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.