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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:39:57+00:00 2026-05-22T16:39:57+00:00

I am currently working on a project in which we need to keep multiple

  • 0

I am currently working on a project in which we need to keep multiple versions of a given entity in the database.

For example let’s assume we have an entity called House which has rooms. Now whenever a room is added, updated or deleted from the house, or a property on the house or any of the rooms is changed, we need to keep both the old and new information. Preferably we would like to group changes together in a “change set” (really the problem is sort of like source control).

Now the actual model is quite a bit more complicated than this, but I think this example illustrates the problem.

I would very much like to hear some possible solutions to this problem.

We are running Microsoft SQL Server 2008 R2.

  • 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-22T16:39:58+00:00Added an answer on May 22, 2026 at 4:39 pm

    In data warehouses, this is generally solved using a Slowly Changing Dimension (SCD).

    As a brief summary, you can:

    • Make a surrogate key (an instance id) and use the natural key and a version number (or effective date/time range) to keep track of changes (Type 2 SCD)
    • Have N columns in your room table for N versions (Type 3 SCD)
    • Have a separate “rooms_history” table and only keep the current instance in the rooms table (Type 4)

    My team has traditionally used a combination of Type 2 (for more “recent” data) and Type 4 (for “older” data in an archive). We group changes using a change_id in the objects being changed that is a reference to a change object that includes the date of the change as well as other metadata (user, comments, etc.)

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

Sidebar

Related Questions

Currently we are working on a project in which we need to come up
I'm currently working on a project which will support multiple file writing specifications (imagine
I am currently working on a project which supports multi-language. I have created a
I'm currently working on a project in which i need to read some (Latitude,
I am currently working on a project with which I need to program up
Good morning, I am currently working on a project in which I need to
Currently I am working on a project in which I need to use memcached.
I'm currently working on a project for which I need two sliders.. Currently I'm
I'm currently working on a project in which i need to play a background
I am currently working on a project in which I need to use a

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.