lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Historical product files


From: Greg Chicares
Subject: Re: [lmi] Historical product files
Date: Tue, 25 May 2010 03:13:26 +0000
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)

On 2010-05-20 17:44Z, Vadim Zeitlin wrote:
> On Thu, 20 May 2010 19:35:19 +0200 Vaclav Slavik <address@hidden> wrote:
> 
> VS> On Wed, 2010-05-19 at 16:55 +0000, Greg Chicares wrote:
> VS> > Of course, we could use xml comments to suppress everything that isn't
> VS> > current, but then we'd have to alter the format later to make such data
> VS> > accessible again.
> VS> > 
> VS> > Is there any radically-different good idea that I've overlooked?
> VS> 
> VS> None that I could think of.
> 
>  Me neither unfortunately (I say this because I don't especially like this
> proposal but part of the problem is that I don't even know what precisely
> is bad about it).

"Mr. Hyde was pale and dwarfish; he gave an impression of deformity
without any nameable malformation, he had a displeasing smile, he
had borne himself to the lawyer with a sort of murderous mixture of
timidity and boldness, and he spoke with a husky, whispering and
somewhat broken voice,--all these were points against him; but not
all of these together could explain the hitherto unknown disgust,
loathing, and fear with which Mr. Utterson regarded him. 'There
must be something else,' said the perplexed gentleman. 'There is
something more, if I could find a name for it.'"

It seemed unclean to me, too, so I traced my thoughts here, hoping
you or Vaclav might show me a clean solution that I had missed;
but now I think there is none within the narrow constraints I had
tried to impose upon the problem.

> I did think about a slight variation on the same theme:
> what about using a different tag name for historical stuff? E.g. have
> something like this:
> 
>       <historical_item EffectiveDate="20020101">...</historical_item>
>       <historical_item EffectiveDate="20020201">...</historical_item>
>       <item EffectiveDate="2010-05-20">...</item>
> 
> ? The obvious advantage is that you don't have to change anything in the
> existing code because there would still be just a single "item". One
> disadvantage is loss of some consistency but OTOH don't we actually want to
> treat the last item specially?

Today, we'd want to treat it specially, and ignore the others.
But eventually we'd want to choose among them at run time.

>  Another, potentially more serious, disadvantage is that files will need to
> be edited (although only slightly, but still) and not just appended to when
> a new set of data is added. I don't know how big a problem would this be in
> practice.

I don't think that's a big problem, and I don't believe we can
(or should want to) avoid editing.

For now, here's what Wendy and I decided to do. If we had:
  <some_interest_rate>0.06</some_interest_rate>
last month, and the rate has become five percent, we'll change it
more or less like this:

- <some_interest_rate>0.06</some_interest_rate>
+ <!-- 20100401 <some_interest_rate>0.06</some_interest_rate> -->
+ <some_interest_rate>0.05</some_interest_rate>

That's the simplest way to continue to accumulate history. We can
transfer prior history at our leisure, then put aside the code we
formerly used for creating the old '.db4' (etc.) files, hoping
never to have to look at it again. Later on, we can figure out a
really good way of implementing a historical database, and
transform the accumulated history to an appropriate format then.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]