How to guarantee uniqueness when N tables have 1:1 relationship with a common table?
问题 Lets suppose I have a scenario with the following model: An Animal table which represents any animal, a Dog table and a Bird table, each one with a 1:1 relationship with the Animal table. Animal INTEGER id (PK) STRING name Bird INTEGER id (PK FK referencing `Animal.id`) Dog INTEGER id (PK FK referencing `Animal.id`) (I'm giving only the keys just to be clear) How can I guarantee that a given row in the Animal table will have JUST one referenced row in either the Dog or the Bird table? The