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 6896013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:58:51+00:00 2026-05-27T06:58:51+00:00

I have few tables in which there could be an update on some of

  • 0

I have few tables in which there could be an update on some of the fields.

I would like to keep a history of changes of different fields.
Different fields however have different types, however I wouldn’t want to create many different columns in my “auditing” table.

So I though should I use serialization (I used it often in PHP), I’m not sure however how efficient it would be in Java/MySQL (I’m not using any data frameworks etc). If serialization, then to what? XML/JSON?

I thought two tables:

  • AuditEntityProperty (Id (PK), EntityId (FK), PropertyName, From, To, DateTime, Username)
  • AuditEntity (EntityId (PK), EntityName)

From/To are my current problems that I’m not sure how to address.
I’m leaning towards XML and using TEXT as datatype for both. Ideas?

  • 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-27T06:58:52+00:00Added an answer on May 27, 2026 at 6:58 am

    I would suggest XML.

    My table structure:

    Audit_id, operation, preImage, postImage, userId, datetime, entityName, timestamp

    Then I would map this to say an AuditBean, I would have used JPA, hibernate if I would have an option of, Use Spring AOP to update the audit table when table structure is updated.

    One table insertion which would have preImage and postImage.

    For XML generation I think XStream is one of the most easy use.

    All the table which needs to be Audit, I would have marked them as XMLConvertable (So that I can easily get Class Alias, and other alias fields for XStream) and Auditable (So that my AOP code can extract the preImage from say database)

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

Sidebar

Related Questions

I have a few tables with 70-80 columns in them. I would like to
I have got a few tables which I am trying to join. I just
i have an entity-model file (edmx) file which contains few tables and few stored
I have a table, called Prices composed of a few fields, two of which
We have a few tables with persisted computed columns in SQL Server. Is there
I have a few controls defined inside an update panel which are bound to
I have a table which consists of a few columns, including a Key Value
I'm using Filemaker Pro 12 Advanced. I have a few tables but have really
I have a few thousand tables in my SQL Server instance, and I need
in my application I have a few CListCtrl tables. I fill/refresh them with data

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.