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 7798933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:08:47+00:00 2026-06-02T00:08:47+00:00

I have a basic CRUD web app where people can create articles/edit them. I

  • 0

I have a basic CRUD web app where people can create articles/edit them. I now want to add the ability to keep revision histories of all edits. Currently, I have an Articles table that looks like this:

Article(id, title, content, author_id, category_id, format)

I have considered 2 options for changing my current schema to add support for revision history. Basic idea is every single edit for any article is stored as a record in a Revision table. So Articles and Revisions is a One-to-many relationship.

1st option (normalized):
One table for article metadata, one for revisions. No duplicate data stored.

Article(id, title, category_id)
Revision(id, content, author_id, format)

2nd option (de-normalized):
Two tables like option 1 but with some duplicate columns.

Article(id, title, content, author_id, category_id, format)
Revision(id, article_id, content, author_id, format)

I’m thinking of going with the 2nd option because it will make my coding much easier (less complex, less lines of code). I know it isn’t “academic” and “pure” but my personal feeling is that having to do extra joins would hurt code maintenance. Also, performance should be better since not as many joins will have to be done.

Is this a sound way to go about this task? Possibly any unforeseen or long-term consequences I am overlooking?

  • 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-06-02T00:08:48+00:00Added an answer on June 2, 2026 at 12:08 am

    The performance argument is nonsense – you are doing less JOINs, but RDBMS are optimized for JOINs.

    However you are potentially pulling a lot more data from the server than is necessary, which can’t be optimized away.

    You also potentially have a consistency issue. Duplicating data for the same item in different tables leads to the ability to have inconsistencies. What if the revision records and the article record have different values for format or author? How do you know which is correct? What if the content in Articles doesn’t match any of the revisions?

    You really should normalize this. I would add a CurrentRevision field to your Articles table to link to the current version, and you should have an ArticleID in the Revisions table to link the two together.

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

Sidebar

Related Questions

So, I have a basic app for storing, searching, and manipulating data. Basic CRUD
actionmailer actionpack activeresource activesupport I have a basic scaffolded CRUD app that uses ActiveRecord
I have basic hello word example of Prime Faces. I have created dynamic web
I have a basic question, in the Django template language how can you tell
I have a pretty generic repository that does basic CRUD for many of my
I have a basic CRUD with Company model. To make the company name show
I'm about to make a web app which will have a pretty heavy client
I have thrown together a small Lift application, using CRUDify, to perform basic CRUD
I want to achieve basic CRUD operations available of the db schema I already
I am developing a small web app. There isn't any advanced functionality, just basic

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.