# SQL -\> Diagram script

**URL:** <https://www.ruby-forum.com/t/sql-diagram-script/52356>\
**Category:** Rails\
**Created:** [January 13, 2006, 1:25am UTC](https://www.ruby-forum.com/t/sql-diagram-script/52356 "2006-01-13T01:25:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@jim](https://www.ruby-forum.com/u/jim)\
**Post date:** [January 13, 2006, 1:25am UTC](https://www.ruby-forum.com/t/sql-diagram-script/52356/1 "2006-01-13T01:25:53Z")

</div>

Did I see some code posted here that would create a graphical  
representation of a database relationships using the graphviz utilities?

---

<div class="post-metadata">

**Author:** ![jim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@jim](https://www.ruby-forum.com/u/jim)\
**Post date:** [January 13, 2006, 12:04pm UTC](https://www.ruby-forum.com/t/sql-diagram-script/52356/2 "2006-01-13T12:04:07Z")

</div>

There’s pgautodoc if you’re using postgresql:

[http://www.rbt.ca/autodoc/index.html](http://www.rbt.ca/autodoc/index.html)

I’d be amazed if there wasn’t something similar for mysql.

On 13/01/06, Jim [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Did I see some code posted here that would create a graphical  
> representation of a database relationships using the graphviz utilities?

–  
Rasputin :: Jack of All Trades - Master of Nuns  
[http://number9.hellooperator.net/](http://number9.hellooperator.net/)

---

<div class="post-metadata">

**Author:** ![jim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@jim](https://www.ruby-forum.com/u/jim)\
**Post date:** [January 13, 2006, 2:22pm UTC](https://www.ruby-forum.com/t/sql-diagram-script/52356/3 "2006-01-13T14:22:07Z")

</div>

Dick D. wrote:

> There’s pgautodoc if you’re using postgresql:
> 
> [http://www.rbt.ca/autodoc/index.html](http://www.rbt.ca/autodoc/index.html)
> 
> I’d be amazed if there wasn’t something similar for mysql.

I couldn’t find one… I was amazed.:^) I converted the db to  
PostgreSQL, used pg\_autodoc, and Dia. It was faster than doing it all  
by hand! There are plenty of MySQL to PostgreSQL conversion tools on  
the PostgreSQL site, most of which don’t work with the latest MySQL, but  
they are a start.

Please let me know if you find (or write) a MySQL → Dia tool.

- Ian

---

<div class="post-metadata">

**Author:** ![jim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@jim](https://www.ruby-forum.com/u/jim)\
**Post date:** [January 13, 2006, 10:08pm UTC](https://www.ruby-forum.com/t/sql-diagram-script/52356/4 "2006-01-13T22:08:53Z")

</div>

I use DBVisualizer for an administration/graphical representation. You  
can print out the graphical output, arrange it in a  
hierarchical/orthagonical/organic method as well.

[http://www.minq.se/products/dbvis/](http://www.minq.se/products/dbvis/)

I really like their product and bought the full version. You just need  
to give it a JDBC driver for your database, and connect.

- Nic.

On 1/12/06, Jim [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 

–

- Nic

---

<div class="post-metadata">

**Author:** ![jim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@jim](https://www.ruby-forum.com/u/jim)\
**Post date:** [January 13, 2006, 8:40pm UTC](https://www.ruby-forum.com/t/sql-diagram-script/52356/5 "2006-01-13T20:40:38Z")

</div>

Hi Jim,

Have you looked at DBDesigner4 at [http://www.fabforce.net/](http://www.fabforce.net/) which will  
become mySQLWorkbench soon in the mySQL distro. I don’t have a lot of  
experience with it since I just downloaded and installed it myself. It  
can  
import existing schema but I am not sure if it will automatically  
generate a  
relationship diagram. I will soon find out 🙂

-bakki
