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.