[sqlite] ensuring uniqueness of tuples spanning across multiple tables?

2011-10-04 Thread Ivan Shmakov
Well, this case is somewhat weird. I have a number of tables like: PRAGMA foreign_keys = 1; CREATE TABLE foo-L ( key INTEGER PRIMARY KEY REFERENCES foo (key), value INTEGER NOT NULL); Which are tied to a single table, like: CREATE TABLE foo (

Re: [sqlite] ensuring uniqueness of tuples spanning across multiple tables?

2011-10-04 Thread Simon Slavin
On 4 Oct 2011, at 8:30am, Ivan Shmakov wrote: This structure is, obviously, could just as well be represented with, e. g.: CREATE TABLE foo ( key INTEGER PRIMARY KEY, value INTEGER NOT NULL, value-1 INTEGER, … value-N INTEGER); (I. e.,