On 5 Mar 2011, at 11:21am, Enrico Thierbach wrote:
> using a different field would break associations between tables. For example:
>
> Assume we have tables a and b, and a join table as_to_bs. The a and b table
> both have a uniqueKey column, as you suggest, that will be set by a trigger.
> If two database applications create a and b objects that are joined (e.g.
>
> a_rowid = INSERT INTO a VALUES("a")
> b_rowid = INSERT INTO b VALUES("b")
> INSERT INTO as_to_bs (a_id, b_id)
Then none of these things should be relating to the id field, they should
instead be relating to this new key field you've made up:
INSERT INTO as_to_bs (a_mykey, b_mykey)
You're entering the realms of database synchronisation which is a whole kettle
of worms you really don't want to get into.
Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users