I'm checking right now database designer way of updating / creating foreign keys from pk, and as part of this work I want to add uk / fk implementation, but I want to check some points before, because I'm not totally sure about it, please I'll appreciate your help.
1.How should I add option to choose between pk and uk as source of foreign key ?
my idea: right click over relationship let me choose source of fk: uk (allow me to choose which uk of many) or pk
2. When I create a fk some columns are added to table and
MATCH matchtype
right now is only
MATCH FULL
but I have more options to choose like:
MATCH PARTIAL
(is still no implemented yet or docs are outdated )
MATCH SIMPLE
, . Question here is should I let the user to choose between match full and simple (not partial yet)?
reference:
http://www.network-theory.co.uk/docs/postgresql/vol1/CREATETABLE.html#SEC2843.
suppose that I created a fk from a pk if I add hierarchy all fk columns become fk/pk that's fine, but if I created a fk from an uk and I add hierarchy, what should be the normal behavior?.
docs said: Unique constraints and primary keys are not inherited in the current implementation. This makes the combination of inheritance and unique constraints rather dysfunctional. reference:
http://www.network-theory.co.uk/docs/postgresql/vol1/CREATETABLE.html#SEC284Regards, Luis.