Re: Looking for suggestions about how should I implement an action at database designer UI

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: Looking for suggestions about how should I implement an action at database designer UI
Date: 2011-06-14 20:36:10
Message-ID: 1308083770.2008.4.camel@laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Tue, 2011-06-14 at 00:01 -0430, Luis Ochoa wrote:
> In a relationship between tables, I need to allow use of existing
> columns as destination target of my foreign key columns.
> Right now, when a user create a relationship between two tables, he
> should select kind: from fk or from uk ( and which?) and the fk
> columns are created in an automatic way at destination table.
>
> This new feature will require a mapping between this new fk columns
> and existing columns, allowing user to choose which fk columns will
> create an automatic column at destination table, and which column will
> use a existing column as fk.
>
> My question is how to do this process, I suggest two ways:
>
> (1) User create a relationship between (dragging mouse) and when he
> drop relationship end instead of creating automatic fk, a new dialog
> starts a allow user to choose the mapping between each column in fk at
> destination table between two options: choose an existing column,
> create an automatic one.
>
> (2) User create a relationship between (dragging mouse) and when he
> drop relationship all fk columns are automatically created, if user
> wants to mapping a fk from a new automatic column or to an existing
> column, he should select an option from right click to allow bring a
> dialog as described above to do this mapping.
>
> Dialog in both cases will be like:
>
> [origin fk column 1] select mapping between [ automatic fk col and
> an existing column ]
> [origin fk column 2] select mapping between [ automatic fk col and
> an existing column ]
> ...
>
> Any suggestions or advices are welcome.
>

I prefer #1. With #2, the user will have to delete a column he never
asked to create.

--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2011-06-14 21:00:15 Re: Branch 1.14?
Previous Message Guillaume Lelarge 2011-06-14 20:34:10 Re: Branch 1.14?