From: Robert M. <rob...@gm...> - 2006-11-14 22:33:29
|
On 11/14/06, Gerd Wagner <bir...@t-...> wrote: > LeO Welsch wrote: > > Hi, > > > > I have added several tables on the Graph and now I wanna add > > the relation, but the context-menu does not indicate how to do > > this. The Menu-Item 'add table referenced by (no hit on FK)' > > is grayed out. Is there a way to add it manually? > > Or what have I done the wrong way? > No there is no way to change things in the database from within a Graph right > now. One day I'll implement it but not in the near future. > > Sorry > > Gerd > > P.S.: If anyone feels like doing it first. Please go ahead I'll be of any help I > can. There is work being done at the moment on a plugin (Refactoring) whose goal is to make typical refactorings (such as adding a foreign key, among others) possible with a number of different database dialects. The work that is being done leverages (and extends) Hibernate's mechanism for generating correct SQL according to the dialect of SQL for the database that SQuirreL is connected to. It will be some time (not even going to speculate at the moment) but adding/modifying/dropping constraints are definitely planned. My intent here is just a little notification in case someone has decided to run off and implement this, that there is a framework in place to accomodate this functionality. And we should probably coordinate efforts rather than duplicate them. Rob |
From: Gerd W. <bir...@t-...> - 2006-11-14 23:05:38
|
Robert Manning wrote: > On 11/14/06, Gerd Wagner <bir...@t-...> wrote: >> LeO Welsch wrote: >>> Hi, >>> >>> I have added several tables on the Graph and now I wanna add >> > the relation, but the context-menu does not indicate how to do >> > this. The Menu-Item 'add table referenced by (no hit on FK)' >> > is grayed out. Is there a way to add it manually? >> > Or what have I done the wrong way? >> No there is no way to change things in the database from within a Graph right >> now. One day I'll implement it but not in the near future. >> >> Sorry >> >> Gerd >> >> P.S.: If anyone feels like doing it first. Please go ahead I'll be of any help I >> can. > > There is work being done at the moment on a plugin (Refactoring) whose > goal is to make typical refactorings (such as adding a foreign key, > among others) possible with a number of different database dialects. > The work that is being done leverages (and extends) Hibernate's > mechanism for generating correct SQL according to the dialect of SQL > for the database that SQuirreL is connected to. It will be some time > (not even going to speculate at the moment) but > adding/modifying/dropping constraints are definitely planned. My > intent here is just a little notification in case someone has decided > to run off and implement this, that there is a framework in place to > accomodate this functionality. And we should probably coordinate > efforts rather than duplicate them. You are absolutely right. I would even try to use the refactoring Plugin from within a Graph. Some time ago I introduced a mechanism that allows Plugins to communicate with each other. I did that to use the Scrips Plugin from within the Graph Plugin. One suggestion for the Refactoring Plugin: Could you allow to generate DDL Scripts in the SQL Editor? Gerd |
From: Robert M. <rob...@gm...> - 2006-11-15 02:34:13
|
On 11/14/06, Gerd Wagner <bir...@t-...> wrote: > You are absolutely right. I would even try to use the refactoring Plugin from > within a Graph. Some time ago I introduced a mechanism that allows Plugins to > communicate with each other. I did that to use the Scrips Plugin from within the > Graph Plugin. > > One suggestion for the Refactoring Plugin: Could you allow to generate DDL > Scripts in the SQL Editor? Absolutely. I was thinking maybe a configuration (or button in addition to the 'Show SQL') that would copy the refactoring SQL to the editor and possibly execute it. At the moment, you can copy the SQL from the dialog (ErrorDialog was probably a poor choice, I know) and paste it into the SQL Edit tab. But I think it would be better to give that option directly. It might have some overlap with the SQLScripts plugin at some point. I was also thinking that the SQL Scripts plugin can benefit from dialects for creating table scripts by prompting the user to pick a target dialect to write the table script in. Once the refactoring plugin is reasonably complete (say in 20 years :) and if no one else has implemented this in open source, the next plugin that would be really nice to have is the database diff plugin. For now you can simulate it by creating table scripts then diffing them as regular files. It sure would be nice to combine the diff and refactoring capabilities. So many ideas, so little time... Rob |
From: Gerd W. <bir...@t-...> - 2006-11-15 21:58:31
|
Robert Manning wrote: > On 11/14/06, Gerd Wagner <bir...@t-...> wrote: >> You are absolutely right. I would even try to use the refactoring >> Plugin from >> within a Graph. Some time ago I introduced a mechanism that allows >> Plugins to >> communicate with each other. I did that to use the Scrips Plugin from >> within the >> Graph Plugin. >> >> One suggestion for the Refactoring Plugin: Could you allow to generate >> DDL >> Scripts in the SQL Editor? > > Absolutely. I was thinking maybe a configuration (or button in > addition to the 'Show SQL') that would copy the refactoring SQL to the > editor and possibly execute it. At the moment, you can copy the SQL > from the dialog (ErrorDialog was probably a poor choice, I know) and > paste it into the SQL Edit tab. But I think it would be better to > give that option directly. It might have some overlap with the > SQLScripts plugin at some point. I was also thinking that the SQL > Scripts plugin can benefit from dialects for creating table scripts by > prompting the user to pick a target dialect to write the table script > in. @Leo Sorry for some more "Geek" stuff. But your questions led us to some technical aspects that may be important. @Rob I see the overlap too and just want to encourage you to feel free to move things around to avoid duplicated code. You may freely move things from or to the Refactoring Plugin, Script Plugin, core. I haven't got a clear idea what would be best. Just try out what feels best. Maybe even the existing dependency between the Graph and the Scripts Plugin could be removed. > > Once the refactoring plugin is reasonably complete (say in 20 years :) > and if no one else has implemented this in open source, the next > plugin that would be really nice to have is the database diff plugin. > For now you can simulate it by creating table scripts then diffing > them as regular files. It sure would be nice to combine the diff and > refactoring capabilities. > So many ideas, so little time... Surely better than the other way around. Just do what's most fun at the moment and never hurry. Colin once said "SQuirreL is just a hobby." It's always important to keep that in mind. :-) Gerd |
From: Robert M. <rob...@gm...> - 2006-11-15 10:31:40
|
On 11/15/06, LeO Welsch <le...@gm...> wrote: > > -------- Original-Nachricht -------- > Datum: Tue, 14 Nov 2006 17:33:25 -0500 > Von: "Robert Manning" <rob...@gm...> > An: "Gerd Wagner" <bir...@t-...> > Betreff: Re: [Squirrel-sql-users] Graph- how to use? > > > On 11/14/06, Gerd Wagner <bir...@t-...> wrote: > > Currently not possible, as well not in near future. A refactoring Plugin is currently developed, which would provide that kind of functionallity. The purpose of this plugin is for Developers of Squirrel only. The Graph would provide this feature, if Constrainsts would be addable (through the refactoring Plugin) in the Graph-View. Yes, with the exception that the refactoring plugin is intended for users of SQuirreL. > > MY understanding from the Graph was that it is merley for visualization and not so much for adding constraints and references to the Table. And therefore I am interested to add as Visualization the logical connections. > > Since I have little bit different understanding about how the Graph is currently used, I am interested in what is the purpose of this view? *Only* to display some tables and due to some internal mechanism a relationship is generated? Cause the context-menu with 'Add ... tables' does not work as well. And ordering the names of a DB might be helpful, but ... > Sure, but as I have used it, I thought I can remember that it uses foreign keys to render dependency lines between fields in the tables. So, a child column which is a member of a foreign key to a parent primary key column in a different table will be shown on the graph when both tables are added in such a way that the child column has a line with an arrow pointing to the parent column. So, if you want to have the graph plugin show relationships visually, you must - for the foreseeable future - define foreign keys using regular SQL in SQuirreL. Sorry if this all wasn't clear from our conversation. If you have any other questions, feel free to ask. Rob |
From: LeO W. <le...@gm...> - 2006-11-15 11:55:49
|
> Sure, but as I have used it, I thought I can remember that it uses > foreign keys to render dependency lines between fields in the tables. > So, a child column which is a member of a foreign key to a parent > primary key column in a different table will be shown on the graph > when both tables are added in such a way that the child column has a > line with an arrow pointing to the parent column. So, if you want to > have the graph plugin show relationships visually, you must - for the > foreseeable future - define foreign keys using regular SQL in > SQuirreL. Wouldn't it be useful to add exactly the above paragraph to the Help-File? > Sorry if this all wasn't clear from our conversation. If > you have any other questions, feel free to ask. Since I haven't yet defined any kind of FK, where do I see them in the Objects-overwiew? On the imported Keys? Perhaps a screenshot, where do you see the FK displayed in your Graph-relation would be useful as well for the Help-File. ThX for making clear, what the whole thing is good for. :) LeO -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer |
From: Gerd W. <bir...@t-...> - 2006-11-15 21:26:44
|
LeO Welsch wrote: >> Sure, but as I have used it, I thought I can remember that it uses >> foreign keys to render dependency lines between fields in the tables. >> So, a child column which is a member of a foreign key to a parent >> primary key column in a different table will be shown on the graph >> when both tables are added in such a way that the child column has a >> line with an arrow pointing to the parent column. So, if you want to >> have the graph plugin show relationships visually, you must - for the >> foreseeable future - define foreign keys using regular SQL in >> SQuirreL. > > Wouldn't it be useful to add exactly the above paragraph to the Help-File? That has just been done in CVS and will be available in future releases. Thanks Gerd |
From: LeO W. <le...@gm...> - 2006-11-15 10:09:57
|
-------- Original-Nachricht -------- Datum: Tue, 14 Nov 2006 17:33:25 -0500 Von: "Robert Manning" <rob...@gm...> An: "Gerd Wagner" <bir...@t-...> Betreff: Re: [Squirrel-sql-users] Graph- how to use? > On 11/14/06, Gerd Wagner <bir...@t-...> wrote: > > LeO Welsch wrote: > > > Hi, > > > > > > I have added several tables on the Graph and now I wanna add > > > the relation, but the context-menu does not indicate how to do > > > this. The Menu-Item 'add table referenced by (no hit on FK)' > > > is grayed out. Is there a way to add it manually? > > > Or what have I done the wrong way? > > No there is no way to change things in the database from within a Graph > right > > now. One day I'll implement it but not in the near future. > > > > Sorry > > > > Gerd > > > > P.S.: If anyone feels like doing it first. Please go ahead I'll be of > any help I > > can. > > There is work being done at the moment on a plugin (Refactoring) whose > goal is to make typical refactorings (such as adding a foreign key, > among others) possible with a number of different database dialects. > The work that is being done leverages (and extends) Hibernate's > mechanism for generating correct SQL according to the dialect of SQL > for the database that SQuirreL is connected to. It will be some time > (not even going to speculate at the moment) but > adding/modifying/dropping constraints are definitely planned. My > intent here is just a little notification in case someone has decided > to run off and implement this, that there is a framework in place to > accomodate this functionality. And we should probably coordinate > efforts rather than duplicate them. > > Rob Sorry, do not wanna interfere the developers Geek-language ;) Is it right to summarize it the following way? Currently not possible, as well not in near future. A refactoring Plugin is currently developed, which would provide that kind of functionallity. The purpose of this plugin is for Developers of Squirrel only. The Graph would provide this feature, if Constrainsts would be addable (through the refactoring Plugin) in the Graph-View. Perhaps I misunderstood some things, but I hope nobody complains too much about this ;) MY understanding from the Graph was that it is merley for visualization and not so much for adding constraints and references to the Table. And therefore I am interested to add as Visualization the logical connections. Since I have little bit different understanding about how the Graph is currently used, I am interested in what is the purpose of this view? *Only* to display some tables and due to some internal mechanism a relationship is generated? Cause the context-menu with 'Add ... tables' does not work as well. And ordering the names of a DB might be helpful, but ... Sorry for these questions, but the manual is not very eloquent about the Graph. :) LeO -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer |