Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am looking for a database documentation software where I want to incorporate the output in LaTeX. I want to show the table structures, primary keys and other related information.

I found pst-dbicons (http://www.ctan.org/tex-archive/graphics/pstricks/contrib/pst-dbicons) at CTAN. I will forced to use this if I don't find an alternative. But I am not exactly looking for an ER diagram software.

share|improve this question
    
Looks like graphviz (graphviz.org/Gallery/undirected/ER.html) could be an option. –  Masroor Nov 18 '12 at 16:54
    
You could perhaps be interested in seeing Drawing relationships between elements of a database. –  Claudio Fiandrino Nov 19 '12 at 18:38

1 Answer 1

up vote 7 down vote accepted

Based on the comments and web search, eventually I came up with a working framework for my purpose which might be useful for others.

enter image description here

sqlt-graph --show-datatypes -l dot -n record -f MySQL -t png --graphattr center,margin="0.0,0.0",overlap=false,sep=10,size="20.0,14,0",orientation=landscape --nodeattr fontsize=24,fontname=Helvetica --edgeattr weight=0.05,len=2.0 -o output.png input.sql

  • This produces a .png file which can be used in LaTeX or anywhere else.

  • When included in LaTeX, the output looks something like this (partially smudged out to preserve confidentiality).

Sample output from real life

share|improve this answer
1  
For better results, I suggest to use PS or SVG(Z) format. –  Paul Gaborit Mar 13 '13 at 0:37
    
@PaulGaborit Thanks. Yes, in that case we will have to use -t ps or -t svg instead of -t png. –  Masroor Mar 15 '13 at 8:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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