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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:11:59+00:00 2026-06-01T17:11:59+00:00

We are currently developing a user based web application in java. A user can

  • 0

We are currently developing a user based web application in java.

A user can have many properties like firstname, lastname, Region (eg. Asia, Europe, US, UK), country, Division, Branch, Product etc.

There are normal CRUD screens for this user with all the above fields.

The add/edit screen for user will also have a date field called effective date. The way this add/edit user is different from normal add/edit in regular CRUD is that the update made to the user will not reflect until the effective date.

Lets say today is 6 April and I add a new user with Region say Asia and effective date 10 April. And now I go and change same user and change his region from Asia to US but effective date say 15 May.

So till 15th may the system should show his region as Asia only and on 15th may his region should change to US automatically.

You can think of it as the user who is working in Asia as on April but from 15th may he is moving to work in US i.e. Region changed from Asia to US effective date 15th may. So till 15th may he should be shown as a user in Asia only.

So I can not just update his region from Asia to us in database as a simple update operation.

And this applies to lot of other fields like division , branch and product as well.

I can not have multiple records for the same user.

EDIT 1:

We should also be able to see the user history or the future updates.

Like on the 6 april, I should see that users region will change from 15 May and his division will change from A to B starting 10 may.

I should also be able to delete updates say I come to know later that the proposed transfer of user from Asia to Us effective date 15 may is not going to happen now so I should be able to delete that update.

EDIT 2:-

Given the above situations, How do I make changes in my original user table and the user change log table?

Say for a user with region asia in the system which is going to change from asia to Us in next few weeks. user will have same update for user. He changes region from asia to user and choose effecftive date as some future date.

Now How do I check if region is changed from asia to us (there can be namy mre fields like region). Shall I do it at the code level or is it possible to do it at the datbase level using triggers etc?

Please help me out with designing the system and database for this.

  • 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-01T17:12:01+00:00Added an answer on June 1, 2026 at 5:12 pm

    I will suggest you can implement this system maintaining a CHANGELOG table and a scheduler which will run at a specific time everyday.

    CHANGELOG table
    Attributes :

    • targetTable
    • targetPrimaryKey
    • targetColumn
    • targetValue
    • effectiveDate

    Now, whenever a update is made on required fields, insert a corresponding entry in changelog table.

    Example,

    • targetTable : User
    • targetPrimaryKey : 3 (primary row id of user record)
    • targetColumn : Region
    • targetValue : US
    • effectiveDate : 15 May 2012

    Now, a scheduler will run every day say(at 12:00 AM) and will check for scheduled changes made to be done that day from CHANGELOG table and make those changes in respective target tables.

    Note : This approach has 2 advantages :

    1. You dont have to maintain two entries for same record.

    2. You can target multiple fields(region,division,branch) and multiple tables as well.

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

Sidebar

Related Questions

We're currently in the process of developing a web-based application which will require the
Our team is currently developing a web application, in that we have a class
I am currently developing some user controls so that I can use them at
I am currently developing an EJB 3.0 based application on the JBoss AS 5.0.0.GA
I'm developing a web application and would like to use the jQuery library to
I am currently developing a site and have a need for a javascript-based carousel/slider
Guys I am currently developing a web application, in which rules, which are basically
We are currently developing an application based on NHibernate and ASP.NET MVC and a
I am currently developing a facebook canvas (iframe) based application. Is there any way
I'm currently in the process of developing a digg-like Ruby on Rails application for

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.