Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keeping original values
Message
De
17/11/2003 20:50:18
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
00850822
Message ID:
00850834
Vues:
13
This is similar to the concept of a slowly-changing dimension in Dimensional Modeling. A Goggle search turned up quite a few hits. Start with this one:

http://www.dbmsmag.com/9604d05.html

-Mike

>I'm in the process of redesigning a database that has an unique requirement. The following is simplified example of one of the table design in the current database:
>
>Mailed N-10
>Area C-5
>Listcode C-2
>Package C-5
>nArea C-5
>nListcode C-2
>nPackage C-5
>
>As you can see, there are basically three fields and another set of same fields proceeded with "n" character to represent "new". Any changes to the original data are saved only to these "n" fields so that all original data are preserved. The reason that the tables are designed like this is so that the use can see what the "original" data was before changes were made and revert any changes if necessary which you can't do if you override the original data.
>
>When the reports are run, the query looks like the following:
>
>SELECT SUM(Mailed) AS Mailed,
> Area = CASE WHEN nArea<>'' THEN nArea ELSE Area END,
> Listcode = CASE WHEN nListcode<>'' THEN nListcode ELSE Listcode END,
> Package = CASE WHEN nPackage<>'' THEN nPackage ELSE Package END
> FROM Mailed...
>
>Now, finally to my question: since most records don't have any new values assigned, I feel this design isn't optimal but I can't seem to find a good replacement design. Any thoughs?
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform