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

  • Home
  • SEARCH
  • 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 292205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:09:32+00:00 2026-05-12T06:09:32+00:00

I have an audit table in SQL server. It is to record an entry

  • 0

I have an audit table in SQL server. It is to record an entry for each high-level user action, e.g. update a record, add a new record, delete a record etc.

I have a mechanism for detecting and recording all the changes made (in .NET, not as a trigger in the database) and have a collection of objects that record a field name, previous value and new value. I’m wanting to store the field changes in the same table (not in a separate table, i.e. I don’t want a full-blown normalised relational design for this), so I have a blob field (or it could be a character field) that I want to record the field-level audit data in.

I’m thinking I just want to take my object graph (basically just a list of these field change objects) and serialize it and store the serialized version in the table.

Later, when the user wants to view the changes I can deserialize the field and reconstruct the collection of field changes.

So, what would be the best framework/serialization format in .NET 3.5 to use? I don’t much mind about the size, and it doesn’t have to be human-readable.

  • 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-12T06:09:32+00:00Added an answer on May 12, 2026 at 6:09 am

    Avoid BinaryFormatter for anything that you store long-term (for example in a database); because it contains type/assembly metadata you can easily find that you can’t deserialize the data later. Plus it is .NET-specific! So you’re a bit scuppered if you want to read it from any other platform.

    JSON (via Json.NET) would make a simple, pretty readable format that doesn’t take much space. Xml via XmlSerializer or DataContractSerializer would be fine but isn’t as readable. If space is your biggest concern, perhaps something like “protocol buffers” (protobuf-net and others) – virtually impossible to read without the supporting utility dll, but very fast and efficient.

    I’d be tempted to use JSON, personally. It means I can read the audit in SSMS…

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

Sidebar

Ask A Question

Stats

  • Questions 155k
  • Answers 155k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer <input type="button" value="line &#10; break" /> May 12, 2026 at 10:40 am
  • Editorial Team
    Editorial Team added an answer $('#less').keyup(function(){ $('#net').val(Number($('.grandTot').val() - $('#less').val()).toFixed(2)); alert($('#less').val()); }); You are quite likely… May 12, 2026 at 10:40 am
  • Editorial Team
    Editorial Team added an answer Looks like pagesNumbers is not being retained. Try adding: [pagesNumbers… May 12, 2026 at 10:40 am

Related Questions

In ASP.NET, I'm looking for a way to audit a user leaving my application.
I have been researching audit triggers for some of my sql tables. I came
Scenario: I load some data into a local MySQL database each day, about 2
I'm currently working on an ASP.NET MVC project using NHibernate and I need to
I have a parent table with entries for documents and I have a history

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.