JPA and time stamped data

Discussion in 'Java' started by Chris Ward, Jul 24, 2007.

  1. Chris Ward

    Chris Ward Guest

    Hi,

    I am just about to start playing with JPA to see if it's the right
    tool for my project. Before I set off on this quest I'd be interested
    to hear if anyone out there has used it for persisting to a database
    which has time stamped/versioned data records.

    By this I mean there is a "fromDate" and "toDate" that show the date
    range for which the row/data is valid. If (and only if) the data
    value for the key(s) changes then a new row is created (fromDate =
    today's date, toDate = 99999999 in YYYYMMDD format) and the old entry
    has it's endDate updated from 99999999 to yesterday's date..

    All thoughts welcome.

    Regards,
    Chris
     
    Chris Ward, Jul 24, 2007
    #1
    1. Advertising

  2. Chris Ward

    Lew Guest

    Chris Ward wrote:
    > Hi,
    >
    > I am just about to start playing with JPA to see if it's the right
    > tool for my project. Before I set off on this quest I'd be interested
    > to hear if anyone out there has used it for persisting to a database
    > which has time stamped/versioned data records.
    >
    > By this I mean there is a "fromDate" and "toDate" that show the date
    > range for which the row/data is valid. If (and only if) the data
    > value for the key(s) changes then a new row is created (fromDate =
    > today's date, toDate = 99999999 in YYYYMMDD format) and the old entry
    > has it's endDate updated from 99999999 to yesterday's date..


    I am not familiar with JPA, but I am familiar with persisting data. I suggest
    using NULL as a marker value for an unknown rather than "99999999".

    --
    Lew
     
    Lew, Jul 24, 2007
    #2
    1. Advertising

  3. Chris Ward

    Roedy Green Guest

    On Tue, 24 Jul 2007 03:13:45 -0700, Chris Ward
    <> wrote, quoted or indirectly quoted
    someone who said :

    >I am just about to start playing with JPA to see if it's the right
    >tool for my project. Before I set off on this quest I'd be interested
    >to hear if anyone out there has used it for persisting to a database
    >which has time stamped/versioned data records.


    by JPA do you mean "Java persistence API"??

    If so, it stores stuff in a very fluffy format 32 bit per char in the
    registry. It is for remembering frame sizes, directories last peeked
    at etc.

    --
    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, Jul 24, 2007
    #3
  4. Chris Ward

    Chris Ward Guest

    On 24 Jul, 13:14, Lew <> wrote:
    > Chris Ward wrote:
    > > Hi,

    >
    > > I am just about to start playing with JPA to see if it's the right
    > > tool for my project. Before I set off on this quest I'd be interested
    > > to hear if anyone out there has used it for persisting to a database
    > > which has time stamped/versioned data records.

    >
    > > By this I mean there is a "fromDate" and "toDate" that show the date
    > > range for which the row/data is valid. If (and only if) the data
    > > value for the key(s) changes then a new row is created (fromDate =
    > > today's date, toDate = 99999999 in YYYYMMDD format) and the old entry
    > > has it's endDate updated from 99999999 to yesterday's date..

    >
    > I am not familiar with JPA, but I am familiar with persisting data. I suggest
    > using NULL as a marker value for an unknown rather than "99999999".
    >
    > --
    > Lew


    Hi,

    Thanks. I wasn't around when the value was "blessed" but I assume
    it's used in all manner of sorts/comparisons.

    Chris
     
    Chris Ward, Jul 24, 2007
    #4
  5. Chris Ward

    Chris Ward Guest

    On 24 Jul, 14:21, Roedy Green <>
    wrote:
    > On Tue, 24 Jul 2007 03:13:45 -0700, Chris Ward
    > <> wrote, quoted or indirectly quoted
    > someone who said :
    >
    > >I am just about to start playing with JPA to see if it's the right
    > >tool for my project. Before I set off on this quest I'd be interested
    > >to hear if anyone out there has used it for persisting to a database
    > >which has time stamped/versioned data records.

    >
    > by JPA do you mean "Java persistence API"??
    >
    > If so, it stores stuff in a very fluffy format 32 bit per char in the
    > registry. It is for remembering frame sizes, directories last peeked
    > at etc.
    >
    > --
    > Roedy Green Canadian Mind Products
    > The Java Glossaryhttp://mindprod.com


    Hi.

    I do mean the "Java persistence API". I'm not sure I understand the
    rest of your answer though, sorry.

    This thing : http://www.onjava.com/pub/a/onjava/2006/05/17/standardizing-with-ejb3-java-persistence-api.html

    Thanks for replying though.

    Chris
     
    Chris Ward, Jul 24, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. flamesrock
    Replies:
    8
    Views:
    509
    Hendrik van Rooyen
    Nov 24, 2006
  2. Curtis
    Replies:
    4
    Views:
    14,837
    steve
    Jun 26, 2007
  3. guigouz

    EJB3/JPA and versioning

    guigouz, Sep 24, 2007, in forum: Java
    Replies:
    0
    Views:
    526
    guigouz
    Sep 24, 2007
  4. carmelo

    JPA and Foreign key constraint

    carmelo, Oct 27, 2009, in forum: Java
    Replies:
    5
    Views:
    9,104
    SergeyT
    Oct 29, 2009
  5. Manzoorul Hassan

    Log files in a Date / Time Stamped Directory

    Manzoorul Hassan, Mar 17, 2005, in forum: Perl Misc
    Replies:
    15
    Views:
    158
    Brian McCauley
    Mar 18, 2005
Loading...

Share This Page