Jump to content

How does a wiki database work?


emehrkay

Recommended Posts

With all of the revisions?

  • When a change is made, is the whole body saved, or just the change?
  • If just the revision is kept, how exactly is that done?
  • Is the current version and older versions kept in the same table or are they moved to another one?

 

Thanks

Link to comment
Share on other sites

I'm interested in this too. Would it be easier to simply make a "snapshot" of the original, change it, and store it? I don't know how memory intensive this would be for large chucks of text but if it's not much then it sounds like the easiest way to do it. You can even compare the changes from the most current version with the previous versions with a simple character-by-character comparison I would believe.

 

Or maybe for each revision, the original document is only changed with dated tags around the original part. Subsequent changes to that part would result in more tags like so...

 

Original

[010120071201]1st revision to [/010120071201]original (Jan. 1, 2007 12:01am)

[010120071201][010220071201:2]1[/010220071201]nd revision to [/010120071201]original (Jan. 2, 2007 12:01am with change from 1 to 2)

 

Output:

Original

1st revision to original

2nd revision to original

 

and so forth. Then we can parse the timestamped tags and show the most recent changes (if the user requests that) or an earlier version. Well... scratch that... this looks too complicated ;D I'm sure there's an easier way.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.