From: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
---|---|
To: | Luis Ochoa <ziul1979(at)gmail(dot)com> |
Cc: | pgadmin-hackers(at)postgresql(dot)org |
Subject: | Re: Question about fk and uk for Database Modeler |
Date: | 2011-05-22 06:40:26 |
Message-ID: | 4DD8AFDA.90901@lelarge.info |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
On 05/20/2011 05:26 PM, Luis Ochoa wrote:
> 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
>
Fine to me.
> 2. When I create a fk some columns are added to table
Why? a user could create a FK with existing columns.
> 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)?
Right click on the relationship, and the MATCH FULL/SIMPLE choice is
available in this contextual menu.
> 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?.
I don't understand what you mean here.
> 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
>
This is in the case of inheritance, mostly when you can to add
partitions to a table.
Which TODO are you working on?
--
Guillaume
http://www.postgresql.fr
http://dalibo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Luis Ochoa | 2011-05-22 21:02:56 | Re: Question about fk and uk for Database Modeler |
Previous Message | Guillaume Lelarge | 2011-05-22 06:34:15 | Re: A question about database designer first deliverable |