Re: [SQLObject] Constraint for Time Series DB
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ph...> - 2010-08-10 18:37:58
|
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. -- Oleg Broytman http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |