Correct - ID is referring to the primary key in the table.  If I insert a data point(date, id, value), it is possible that I will update this point at a later date.  I can manually check in code for existence of the date, id pair, though I was wondering if there was another way to do this, or if there was already a way to impose such a constraint.
- Luis

On Tue, Aug 10, 2010 at 2:37 PM, Oleg Broytman <> wrote:
On Tue, Aug 10, 2010 at 02:16:26PM -0400, luis cota wrote:
> How can I ensure that there exists only one value for a given Date, ID pair?

  In general, by creating a unique index on (date, id) pairs; you can
create the index directly in SQL or in SQLObject.
  But in this particular case... you say ID - do you mean the primary key
for the table? Well, it's itself a unique key, you don't need to make
(date, id) pairs more unique.

    Oleg Broytman    
          Programmers don't die, they just GOSUB without RETURN.

This email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
sqlobject-discuss mailing list