Hello. This might be slightly off-topic for this group, yet it seems so relevant... I''ve been working happily away at my application involving a number of database tables, which Rails deals nicely with. I like that Rails has very strong suggestions for naming elements of my database and I have no problem adhering to that. However, along the way I''ve been dully mapping my database using an entity relationship diagram, which is extremely helpful to me. Especially with Rails, because my app so closely corresponds to the structure of my database. However, I feel that having to update my diagram every time I update my database is a very serious violation of the much-lauded DRY principle. My question: is there a good way to generate a database diagram from my MySQL dumps or directly from my database? Does anybody have a favorite, or even a good, way of doing this sort of things? Thanks again, Raymond
Joost Diepenmaat
2005-Apr-25 16:47 UTC
Re: How to create a graphical view of your database?
On Mon, Apr 25, 2005 at 09:26:44AM -0700, Raymond Brigleb wrote:> My question: is there a good way to generate a database diagram from > my MySQL dumps or directly from my database? Does anybody have a > favorite, or even a good, way of doing this sort of things?I have done something like this myself using Graphviz as the graph generator. The big advantage of graphviz is that all of the layout is done automatically - you only need to specify the nodes/edges in your graph. It works very well on small to medium sized graphs, but can become problematic of your schema is too complex. That was for a custom datamodel description language, though. A quick search on google suggests SQLFairy. The screenshots look quite good. Links: http://www.graphviz.org/ http://sqlfairy.sourceforge.net/
www.datanamic.com ImportER MySQL - generates a DEZ file for use in... DeZign for Windows - graphical ERD app, which can then generate a script not only to recreate your MySQL database schema, but also to convert it to other RDBMS... DataArchitect (www.thekompany.com) might also do the trick with MySQL databases. On 4/25/05, Joost Diepenmaat <joost-wg/WqLBuUjRmR6Xm/wNWPw@public.gmane.org> wrote:> On Mon, Apr 25, 2005 at 09:26:44AM -0700, Raymond Brigleb wrote: > > My question: is there a good way to generate a database diagram from > > my MySQL dumps or directly from my database? Does anybody have a > > favorite, or even a good, way of doing this sort of things? > > I have done something like this myself using Graphviz as the graph > generator. The big advantage of graphviz is that all of the layout > is done automatically - you only need to specify the nodes/edges > in your graph. It works very well on small to medium sized > graphs, but can become problematic of your schema is too complex. > > That was for a custom datamodel description language, though. A > quick search on google suggests SQLFairy. The screenshots look quite > good. > > Links: > http://www.graphviz.org/ > http://sqlfairy.sourceforge.net/ > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Julian ''Julik'' Tarkhanov
2005-Apr-26 01:21 UTC
Re: How to create a graphical view of your database?
On 25-apr-05, at 18:26, Raymond Brigleb wrote:> > My question: is there a good way to generate a database diagram from > my MySQL dumps or directly from my database? Does anybody have a > favorite, or even a good, way of doing this sort of things?Well, these tools are very scarce on our (Mac) side of the fence, but when I had to - I used DbVisualizer for that. Basically it digged into my PostgreSQL database and drawn a graph with all the tables and fields linked by their constraints (simply by inflection). All of this from a live database via JDBC. But it was not editable. I believe if you stick with InnoDB and define your constraints properly (which always seems awkward to me due to the way they''re second-class citizens in MySQL) DbViz should be able to grok it as well. -- Julian "Julik" Tarkhanov
I like this software on OSX: http://www.malcolmhardie.com/sqleditor/cocoa/ Let''s you import/export SQL and view/edit as ER diagrams. - Isaac
Julian ''Julik'' Tarkhanov
2005-Apr-26 20:37 UTC
Re: How to create a graphical view of your database?
On 26-apr-05, at 3:27, Isaac Reuben wrote:> I like this software on OSX: > > http://www.malcolmhardie.com/sqleditor/cocoa/ > > Let''s you import/export SQL and view/edit as ER diagrams. >Yes, the idea is nice but the last time I looked at it it was a pile of bugs, barely usable. You also have XERD[1] (which would totally rock - only shouldn''t it have been abandoned). Actually it''s quite pity that we Mac users have so many talented backend developers on the platform and, at the same time, so few dev tools to make life easier (and modelers/UML graphers and the like are the most heavily missed, me thinks). [1] http://www.joshuahawcroft.com/products/xerd/ -- Julian "Julik" Tarkhanov