Tuesday 3 May 2011

Auto Generate Database(ER) Diagram MySql


To create ER diagram from db schema you can use SchemaSpy.

Here are few steps:
1. Download SchemaSpy

2. Install folwing:
- Java
- JDBC MySQL Connector
- Graphviz (and dot program, which is part of GraphViz)

3.Execute command in console
C:\test>java -jar schemaSpy_5.0.0.jar -t mysql -o folderWhereCreate -host dbHost -db dbName -u dbUser -p dbPassword -dp mysql-connector-java-3.1.13-bin.jar
ps: You can download all in one archive

References:
Automate the generation of your developer and user documentation

7 comments:

  1. Salut,

    După cum ştii în curînd are loc cea mai mare conferinţă ICT din Moldova. Moldova ICT Summit 2011. Organizatorii au decis să ofere acces liber la toate conferinţele pentru 5 bloggeri. Pentru a putea fi unul din cei 5 bloggeri acreditaţi te invităm să participi la un concurs simplu. Scrii despre IT şi despre conferinţă şi primeşti acces la eveniment şi posibilitatea de a cîştiga 5 instruiri în valoare de sute de euro fiecare.

    Sper să-ţi prindă bine această informaţie.

    Detalii pe site-ul evenimentului la categoria Media - Bloggeri. Cine ştie google are patru ochi :)

    ReplyDelete
  2. i want your help ...... i want ER Diagram of bank management system but i couldn't find the right thing so plx help me.....

    ReplyDelete
    Replies
    1. I am pretty sure that Lucidchart has a template of this diagram...

      Delete
  3. mmm...if you hava database you can simply do this, using my article, otherwise google will help you)

    ReplyDelete
  4. how fast is this? i am working on a schema with several hundred tables. is there any way to generate only part of the diagram, for instance starting from one or two tables?

    ReplyDelete
  5. from documentation http://schemaspy.sourceforge.net/ to improve your performance you can play with -lq flag(low quality images increase performance), to specify specific tables i found only this -i "(.*book_table.*)|(library_table.*)"

    ReplyDelete
  6. How did you create the first diagram? Is there a better database diagram creator for making database diagrams?

    ReplyDelete