Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6749627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:42:46+00:00 2026-05-26T12:42:46+00:00

I am busy creating a system where I need to keep track of every

  • 0

I am busy creating a system where I need to keep track of every change in the system. In other words, when a column in the database is changed, I need to know what table, which column, when the change was made, by which user, from what value, to what value.

My first thought was to create a second table for each table for logging purposes, containing fields like column_name, updated_by, updated_on, from_value, to_value (keeping the from_value and to_value fields as strings for simplicity). This, however, will essentially create a duplicate of the database.

My second option would be to create a massive table of a similar type (table_name, column_name, updated_by, updated_on, from_value, to_value) for all the tables, yet this will result in an unmanageable table, as changes will be happening frequently.

Both these option have the same problem, that I am unsure how to reference the columns of a table, and worst of all, how do I handle a change in column names later in the life of the application.

Any thoughts and suggestions would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:42:46+00:00Added an answer on May 26, 2026 at 12:42 pm

    I’m going to make some assumptions here:

    • you’re not constrained by disk space
    • you have a non-trivial data model
    • you need to be able to report your audit/history information in a human-readable format
    • you’re not working with extreme performance or scalability requirements
    • the audience for your audit data is business user level, not technical level.

    In that case, the best solution I know is to make “history” a first-class concept in your design. The link GregL quoted has a good description of this; my simpler implementation basically means having “valid_from” and “valid_until” and “operator_id” columns on every table, and to use “is_valid” rather than the delete operation.

    This is better than auditing changes to separate tables, because it allows you to create a complete picture of your data at any given point in history, complete with all the relationships between tables, using the same logic as your regular data access code. That, in turn, means you can create reports using standard reporting tools, answering questions like “which operator changed the prices for all products in the food category”, “how many products were less than $100 on 1 Jan?” etc.

    It does consume more space, and it does make your database access logic more complex. It also doesn’t play nicely with ORM solutions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am busy creating an order system. I am having issues trying to create
I'm new to jQuery and busy with creating an graph based on a table.
I'm busy creating a very simplistic ruby on rails app that won't need a
I am busy creating an order system. I am having issues trying to create
I am busy creating a less complicated version of NinePatchDrawable that tiles the inner
I have been busy in my project creating a webapp (in struts) that manages
I am busy writing my own collection type and need to have a function
I am busy with creating a Google map v3 site. If you have a
i need help with creating a regex for putting all values into an array!
We are busy creating a server hierarchy manager (possibly not the greatest name). What

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.