13

I'm looking at building basic CMS functionality into our web product and am researching tips and design ideas for versioning content. I'm specifically looking for database schemas in use today.

What are you using for content versioning? What patterns apply if you have different types of content that need versions stored? How is question versioning handled on Stack Overflow?

Thanks

3 Answers 3

11

Literature uses a 5 dimensional model for this:

  • version (wanting to change)
  • status (life cycle: creating, testing, deploy, retire)
  • view (html, pdf, file system, derivability)
  • hierarchy (page, section, paragraph)
  • variant (largely similar, describing the differences, product families)

Most systems only handle a few of these dimensions. To handle all five, you have to describe (fix) your development process.

The reference:

Managing design data: the five dimensions of CAD frameworks, configuration management, and product data management.
van den Hamer, P. Lepoeter, K.
Philips Res., Eindhoven;

This paper appears in: Proceedings of the IEEE
Publication Date: Jan 1996
Volume: 84, Issue: 1
On page(s): 42-56
ISSN: 0018-9219
References Cited: 26
CODEN: IEEPAD
INSPEC Accession Number: 5175049
Digital Object Identifier: 10.1109/5.476025
Current Version Published: 2002-08-06

1
  • Yes, I found the article very enlighting. Nov 11, 2008 at 22:19
2

just as a reference, drupal uses the following:

node         node_revision
----         -------------
nid*         vid*
vid          nid
...          body
             ...

(node is essentially the main content type). so each revision gets recorded, and to get the latest you pick up the current vid from node. if you're interested in diffs that may be something to add to your version of node_revision as well.

1

My gut instinct is that the best thing for this is (in order of bestitude):

  1. A ready version control system. A nice list here.
  2. Storing diffs. What is a diff here.
  3. I guess the obvious database solution of having a "ContentVersion" table, where you have multiple "Versions" per unique "Content".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.