This is a follow up question to my original question. I'm thinking of going with generating diffs and storing those diffs in the database 'History' table.
I'm using diff-match-patch library to generate what is called a 'patch'. On every save, I compare previous and new version and generate this patch. The patch could be used to generate a document at specific point in time.
My dilemma is how to store this data. Should I:
a Insert a new database record for every patch?
a. Too many db records generated. Will be slow and CPU intensive to query.
b. Only one record. If record is somehow corrupted/deleted. Entire revision history is gone.
I'm looking for suggestions, concerns with either approach.