I need the primary keys of 2 sqlite tables (say, id1 and id2) to be related such that no id1 can be equal to any id2 and viceversa. This is because I need to obtain from these 2 tables the same type of xml element, with unique attribute id. Is there a way either in sql as understood by sqlite or in "classic" sql to express such constraints to my id fields? Alternatively, I guess I could create another table with reference to the other 2 and unique id from which I'd take my data... but I'd like to know if it is possible in the other way first, and which is the best practice in this case in your opinion.
Thank you!