23

I need to create an E-R diagram for a database schema using D3js. Any examples, suggestions?
Thanks in advance.

[EDIT] In case there is a library / utility (open source) that is more suitable for this, please so suggest.

4
  • Do you have an example of what you're looking for? Commented Jan 17, 2014 at 13:04
  • 1
    Hello Lars. I just need a way to create a diagram that shows the PK-FK relations in a database schema. For example, see this link lwoodyiii.files.wordpress.com/2010/06/…
    – ajay
    Commented Jan 18, 2014 at 3:54
  • 2
    this is a very interesting and important question! ajay, what would be user actions related to ER diagram? is user supposed to move nodes? does user expect automatic layouts?
    – VividD
    Commented Jan 18, 2014 at 17:04
  • Hello VividD. Thank you for your interest. The basic purpose of this E-R diagram is to allow users to browse the relationships between tables and I also plan to highlight the related columns in other tables when a particular column is selected. The layout should be automatic and the user should be able to move nodes. Also, these layouts are not supposed to be saved (at least not yet!), so it is drawn afresh every time a user selects a table in the schema.
    – ajay
    Commented Jan 19, 2014 at 8:24

1 Answer 1

4

checkout jointjs http://jointjs.com/demos/erd. I made a ER diagram with it.

Also checkout https://github.com/cpettitt/dagre. You can draw directed or undirected graph using it.

1
  • Might as well plot an SVG. Trying to find something dynamic.
    – ficuscr
    Commented Apr 19, 2018 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.