File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes data persistence -- help with some logic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "data persistence -- help with some logic" Watch "data persistence -- help with some logic" New topic

data persistence -- help with some logic

jite eghagha
Ranch Hand

Joined: Oct 06, 2006
Posts: 128
Hi, i attached a picture of my table.

You'll notice, that on insert or update, a row can have a datetime value or not.

A player (player_id) earns $1 per second, so long as that row contains a datetime value.

If a row that once contained a datetime vaule is updated, or if that row is deleted, so that it no longer contains a datetime value, how do i ensure that the players total earning are not lost.

further more, a player may insert a new row at any time that could add more $ per second to the total earnings.

I know i need a second table for the total earnings, but how should i go about regularly updating the total earnings.

I'd appreciate any thoughts.

[Download bd_pic.bmp] Download

I agree. Here's the link:
subject: data persistence -- help with some logic
It's not a secret anymore!