This question consists of some excellent coverage of methods to create a database history/revision plan for data like amounts or multiple choice fields.
However, there's very little discussion of huge text fields, as frequently present in blog/Q&A/wiki/document type systems.
So, an amount be looked at sound practice for storing a brief history of the text area inside a database based editing system? Is storing it within the database even advisable?
I create a wiki engine and page/article revisions are saved inside a database table. Each revision includes a consecutive revision number, as the "current" revision is marked with -1 (simply to avoid NULL).
Revision text is saved as-is, not diffed or something like that like this.
I believe that performance isn't a problem since you will not access older revisions often.
Frequently probably the most sensible method of monitoring the versions of the document would be to keep an eye on the alterations designed to it. Then, if your particular version is asked for it may be reconstructed in the current document and also the partial group of changes.
If you have a very good approach to explaining the kinds of changes to some document (it all depends largely on which the document is and just how it used) then go ahead and make use of a database to trace the alterations and then the versions.
Because of the current condition of Hard disk drive art, it simply doesn't well worth the effort attempting to optimize text storage systems:
Document (ID, Name) and
DocumentRevision (ID, DocumentID, Contents) tables is going to do the task. the
DocumentRevision could also function as a "repository"-wide revision number. If this isn't the behaviour you would like, assign another
VersionID to every Document Revision.