473,769 Members | 2,394 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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>DIPolRid ers

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

May 17 '06 #1
2 1298
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.goog legroups.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>DIPolRid ers

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

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
3015
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 basic knowledge of C++ (through college) although my contract states that I must endeavour to learn more, so my question is - which areas of C++
36
10118
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. So, for $1/hr they expect me to remain within pager range, remain sober, and be available to come to work. That really sucks on weekends. No going to the beach (out of pager range) or out to a friend's cottage (out of pager range), etc. ...
0
1268
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 "blueshell Data Guy" (bDg) valuable for database professionals like DBA's, developers etc. Although bDg serves almost all databases, we're planning to focus the beta on MS SQL Server, Oracle, MySQL, Sybase Anywhere, Advantage DB Server, DB2 and Jet....
3
2737
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 Stroustrup (he actually asked me for help to design C++ ; still unsure why he didn't give me enought credit - probably a poor design choice to have Russian name near c++),Branimir Maksimovic,Vladimir Kouznetsov . Me and Victor went to the same...
1
1496
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 looks good and its performance is good. My problem is in data accessing and the size of the tables. 1. More than 15 people are going to access the database. 2. There are 5 lines and there are 3 stations in each line entering
0
1120
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 they so desire. My dilemma is this:
2
3182
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 problems that I have encountered to date and the solutions (if any) that I found. http://users.adelphia.net/~brianpclab/ServerControlCollectionIssues.htm This page also has all of the source code in a compressed file that you are free to download...
12
5641
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 aware that the CSS style fascists (maybe too strong a word) disapprove the use of CSS on forms arguing that it hampers rather than aids the user because users have grown used to the way the form is displayed on their browser and function is more...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10219
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9998
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.