Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgadmin-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group