Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7030665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:42:04+00:00 2026-05-28T00:42:04+00:00

I want to store a blog post in a database. I thought it would

  • 0

I want to store a blog post in a database. I thought it would be nice to have different versions of that data, much like version controlling does for text files.

So, I imagine it working like a row in a table, that had version control. So, for example, you could retrieve the latest version of that row, or a previous version. You could even branch from that row.

Does anything like this exist?

Possibly useful info:
I am currently using Python, Django & MySQL. I’m experimenting with MongoDB

Edit for clarity/more context:
I’m looking for a solution more tailored towards “version control” of rows than of databases; I’m not so much interested in branching entire databases. For example, I would be able to query the content of blog post at 1/1/2011 and at 1/1/2010 (without switching databases).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:42:05+00:00Added an answer on May 28, 2026 at 12:42 am

    First off, I must say this is an interesting question.

    In my line of work, I’ve to save versions of various user inputs. The way I do it, and by all means I don’t really know if it’s the right way or not, is the following:

    I have a master table and revisions table. I chose these 2 names for the example’s sake only.

    What master does is stores the following info:

    • id (autoincrement)
    • version_id (int)

    What revisions store is the following:

    • id
    • master_id
    • version_id
    • rest of the relevant data about entered entity (dates, etc)

    What I achieved this way is that I had gotten an ID of, let’s say a blog post. If someone edits the post, I’ll store that info to revisions table. Via triggers I’m incrementing the version_id in revisions table. After that I update master table with the latest version_id number. That way I don’t have to perform MAX() when I want to see what the latest version is.

    That way I obtained simple, yet powerful version system of website’s content. It’s easy to see changes, and it’s also extremely fast to obtain data if you abuse some MySQL cool features (in my actual tables, I’m abusing InnoDB’s clustered primary key to the max. so the db design is slightly diff. than the one I posted here).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Scenario: I have a blog that I want to make a post to. I
I want to store blog and its tags as separate documents. Blog post should
Well, I have a number of different content types that I want to make
I have a blog application that models a database using Entity Framework. The problem
I want to store a large number of sound files in a database, but
I want to store the data returned by $_SERVER[REMOTE_ADDR] in PHP into a DB
I want to store a large result set from database in memory. Every record
I want to store a very large amount of vector data on a server
I have a post widget in a blog application which are stored in a
I am making a blog and store the publishing date of a blog post

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.