473,395 Members | 1,905 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Your Professional Advice Please - Design

Hi All, I have read MANY posts on how to track changes to data over
time

It appears there are two points of view

1. Each record supports a Change Indicator flag to
indicate the current record
(would this be EVERY table?)
2. Each table is duplicated as an archive table and
triggers are used to update archive
Can someone give me some guidance based on REAL world experience
which works best for them?
My scenario - I have insurance policies and must track history as
policies are updated by customer service reps.
Imagine many tables Policy>LifePol>LifePolRiders
AccidentPol >etc...
DIPol>DIPolRiders

To me the archive table scenario does not seem scalable at all....some
guidance on design would be aprreciated...Thanks!!!

May 17 '06 #1
2 1277
It really depends what you mean by history.

I use duplicate table and audit triggers to capture any update/insert/delete
activity on the row and hold it along with mac address and user id to track
stuff but that might be overkill for your situation, the audit tables are
there in case we need to recover something or track who changed what and to
what, it alows me to not worry about history in queries because they don't
contain extra syntax to get rid of the baggage in order to get the current
record.

In the same system we have other implementations of history, for instance
coverage (research analyst covering a sector) - I store this in the same
table with start/end dates because its true history rather than auditing,
and yes - the audit triggers and duplicate table exist on that too....

We need more depth, one possible answer would be your central policies table
that holds the current information and you have a seperate notes table
holding the notes that user made when dealing with the policy.

tony.

--
Tony Rogerson
SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson - technical commentary from a SQL
Server Consultant
http://sqlserverfaq.com - free video tutorials
"vbnetguy" <gm*****@gmail.com> wrote in message
news:11**********************@38g2000cwa.googlegro ups.com...
Hi All, I have read MANY posts on how to track changes to data over
time

It appears there are two points of view

1. Each record supports a Change Indicator flag to
indicate the current record
(would this be EVERY table?)
2. Each table is duplicated as an archive table and
triggers are used to update archive
Can someone give me some guidance based on REAL world experience
which works best for them?
My scenario - I have insurance policies and must track history as
policies are updated by customer service reps.
Imagine many tables Policy>LifePol>LifePolRiders
>AccidentPol >etc...
>DIPol>DIPolRiders

To me the archive table scenario does not seem scalable at all....some
guidance on design would be aprreciated...Thanks!!!

May 18 '06 #2
This wont be much help on how to, but here it goes:
In data warehouse speak, you are talking about a slowly changing
dimension also know as a type 2 dimension. (Ralph Kimbal).
I use this type of data in my datawarehouse. As example, I need to keep
track of a students home campus over time. As we open new campuses, or
students move around the area, students will change their 'home
campus'.
I need to associate student's registrations to a version of their
student record that reflects their home campus at the time of the
registration. Without this, reports would show the students current
campus for a registration from 5 years ago. If the campus opened in
spring 2006, the report would show the student registering for classes
5 years in a campus that didnt exist.

The way I track these changes is with an ETL tool from Cognos: Data
Manager. Once I have built the model, I indicated which fields to
track, and the tool does the rest.
It adds fields to the data.
1. Surrogate key
2. Current Flag indicator
3. Create Date
4. End date
5. effective date
6. update date
I'm glad I dont have to tackle this problem w/o a tool.
I would have a separate table to track the changes. A trigger that
would check for the changes you are looking for. If a change is found:
1. End the current record by putting date in the end_date field.
2. set current_ind field from Y to N
3. get next surrogate key (this is just a int field starting at 1)
4. Insert new record with new surrogate key
5. set current indicator to Y
the tricky bit is how to know when a change happend, after that its
pretty straight forward.
HTH
Rob

May 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Martin Piper | last post by:
Hi all. I've recently landed myself the position of trainee C++ programmer which I'm extremely pleased about, but also nervous. According to the feedback from the interview, I have a good...
36
by: Richard | last post by:
My employer currently pays me $1/hour when I carry a pager. I have to carry the pager every fourth week. The problem is that my employer insists that I be available when I'm carrying the pager. ...
0
by: Harry von Borstel | last post by:
Hello database friends, We are seeking beta testers for our upcoming "blueshell Data Guy Professional". This new application is an extension to our award-winning universal database editor...
3
by: Andrej Hristoliubov | last post by:
I am the best c++ programmer in the whole wide world. Trust ME! My reference is Victor Bazarov,Valentin Samko,Alf P.Steinbach( Me and Alf actually intern together at Microsoft), and Bjarne...
1
by: Arun | last post by:
Hi..I am arun and Thanks to all of you in advance for solving my problem... I am working as a quality co-op for Maytag and I have developed a defect tracking database using access and VBA. It...
0
by: PCC | last post by:
I am writing an ASP.NET web application and I control all the tiers. I need to return all results from the Web Service mid-tier as XML so other people can use our business objects in the future if...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
12
acoder
by: acoder | last post by:
Does anyone know of any resources on designing professional HTML forms? I can code in HTML and CSS, but I'm not the best designer. I just need pointers on good, clean professional design. I am...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.