JPA and time stamped data

C

Chris Ward

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
 
L

Lew

Chris said:
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".
 
R

Roedy Green

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.
 
C

Chris Ward

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".

Hi,

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

Chris
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top