Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2007

Tip: Looking for answers? Try searching our database.

JPA and time stamped data

Thread view: 
Chris Ward - 24 Jul 2007 11:13 GMT
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
Lew - 24 Jul 2007 13:14 GMT
> Hi,
>
[quoted text clipped - 8 lines]
> 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".

Signature

Lew

Chris Ward - 24 Jul 2007 15:01 GMT
> > Hi,
>
[quoted text clipped - 14 lines]
> --
> 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
Roedy Green - 24 Jul 2007 14:21 GMT
On Tue, 24 Jul 2007 03:13:45 -0700, Chris Ward
<christopher.bruce.ward@gmail.com> 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.

Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Chris Ward - 24 Jul 2007 15:12 GMT
On 24 Jul, 14:21, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> On Tue, 24 Jul 2007 03:13:45 -0700, Chris Ward
> <christopher.bruce.w...@gmail.com> wrote, quoted or indirectly quoted
[quoted text clipped - 14 lines]
> 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-persi
stence-api.html


Thanks for replying though.

Chris


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.