Question about fk and uk for Database Modeler

From: Luis Ochoa <ziul1979(at)gmail(dot)com>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: Question about fk and uk for Database Modeler
Date: 2011-05-20 15:26:26
Message-ID: BANLkTincYpv=xAGj6pP5r1QORAHS3zQ2Zg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

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#SEC284

3. 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#SEC284

Regards, Luis.

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Guillaume Lelarge 2011-05-20 16:43:09 pgAdmin III commit: Allow to add comments on a new column
Previous Message Nikhil S 2011-05-20 02:47:15 Re: Re: pgadmin III - "Display objects" part of database restore errors out in non-English locales