Re: Scaled or Granular Dates

From: Pat Turner <purpletrousers_at_netscape.net>
Date: Mon, 12 Jan 2004 15:47:22 +0000
Message-ID: <jkzMb.177$M4.95_at_newsr2.u-net.net>


Hi all,

thanks for the responses so far. I will take a look at the books suggested and see if they provide me with something i can use.

I have been thinking about the problem since then and I have been wondering why we measure in milliseconds at all. I.e. why are we storing dates as a simple number, being an offset from a particular date, measured in predefined units. Why aren't we storing dates in the human readable form of any particular calendrical system. I imagine that it is very rare that we wish to store dates to the millisecond anyway; except for create/modify timestamps. It would be much more developer friendly if dates could be created with and stored as real world date data, gathered in the possible units available to us; thousands, hundreds, tens, units of years, months, days, hours, seconds, milliseconds.

If we did have this system and each of these parts of the date type is stored separately in the object, so that if the value is null, we know that the granularity of that date does not stretch to that degree of accuracy.

I know that with this system we would need to have conversion facilities to migrate a Julian Date to a Gregorian date, and indeed we would need a conversion facility from every calender to every other calender, but i don't see that this is a problem. At the moment we have to convert milliseconds to component parts anyway.

Anyway, thanks again for the input. I'll be off now for some heavy duty background reading.

Regards
Pat

Jonathan Leffler wrote:

> --CELKO-- wrote:
>
>>>> January 2004 Scientific American? It is mind blowing. It might
>>>
>> also be wrong. The preamble reads 'We perceive space and time to be
>> continuous, but if the amazing theory of loop quantum gravity is
>> correct, they actually come in discrete pieces'. ... but maybe the
>> sweeping statement about continuity of time is overstated. <<
>>
>> That is on the stack for the month. I am swamped right now; one of
>> the many problems with being a grown up is that you have to provide
>> Christmas instead of enjoy it.
>
>
> I know that feeling :-)
>
>> Actually, Wolfram is into a fully
>> discrete model of the universe-as-finite-automata that is interesting.
>
>
> Deus ex machina? Stochastic, and even if finite, the automata would
> have to be awfully big. I think we're off at a tangent here, though :-)
>
>>>> There's also a book "Time Granularities in Databases, Data Mining,
>>>
>> and Temporal Reasoning" by C Bettini, S Jajodia, S X Wang, published
>> by Springer, 2000, ISBN 3-540-66997-3 (in Engish, despite the ISBN
>> prefix suggesting German). I've not read it all yet - on the to do
>> list - but it might be of some relevance, too. <<
>>
>> Sounds good; I'll take a look. Do you have the Morgan-Kaufmann book
>> by Rick Snodgrass? Lots of code, but you can go back to his work at
>> University of Arizona for the theoretical stuff.
>
>
> Yes, I have "Developing Time-Oriented Database Applications in SQL" by
> Snodgrass. Its both harder and simpler than Time Granularities.
> Harder because it is messing with real-world SQL and the mess that
> different DBMS vendors provide for supporting, more or less, temporarl
> data. Easier because it isn't so deeply into the meaning of
> 'granularities'. Still, DTODA is well worth a look because it is much
> easier to read than TG (but Amazon says it is currently not available,
> whereas TG is still available).
>
> The original question was definitely related to granularities - though
> that may have been lost given that both of us have dropped all the
> original question from the messages.
>
Received on Mon Jan 12 2004 - 16:47:22 CET

Original text of this message