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'm trying to display all of my corporate database instances and their relationship to each other, so to speak the database links. I found the geometry shape cylinder using TikZ \usetikzlibrary{shapes.geometric}, but I'm new to the whole TikZ stuff and it doesn't worked out that well so I thought maybe you could help me getting something like the following figure:

enter image description here

There will be a ton of instances and arrows, but I hope that you guys could give me a start so that I could do the rest on my own.

share|improve this question
1  
Take a look at tex.stackexchange.com/questions/78357/… –  percusse Jul 13 '13 at 9:54
    
Also, you can use cylinder shape from \usetikzlibrary{shapes.geometric} –  JLDiaz Jul 13 '13 at 10:15
    
@JLDiaz: Edited my question, forgot the formatting. –  Chris.V Jul 13 '13 at 11:51

1 Answer 1

up vote 6 down vote accepted

A very basic approach could look like this.

\documentclass[11pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{calc,positioning,shapes.geometric}

\begin{document}
  \begin{tikzpicture}[
    >=stealth,
    node distance=3cm,
    database/.style={
      cylinder,
      cylinder uses custom fill,
      cylinder body fill=yellow!50,
      cylinder end fill=yellow!50,
      shape border rotate=90,
      aspect=0.25,
      draw
    }
  ]
    \node[database] (db1) at (0,0) {DB1};
    \node[database,right of=db1] (db2) {DB2};
    \node[database,below of=db1] (db3) {DB3};

    \draw[->,blue!50] (db1) --  node[black,midway,above,sloped,font=\scriptsize]{Link: Name} node[black,midway,below,sloped,font=\scriptsize]{Owner: Name} (db3);
    \draw[->,blue!50] (db1) -- ++(0,1) -- ($(db2)+(0,1)$) node[black,midway,above,font=\scriptsize]{Link: Name} node[black, midway,below,font=\scriptsize]{Owner: Name} -- (db2) ;
  \end{tikzpicture}
\end{document}

Can for sure be improved here and there.


enter image description here

share|improve this answer
    
This is a really good starting point for me with which I hopefully can complete my figure. Is there a possibility to do a multiline text inside the cylinder? –  Chris.V Jul 13 '13 at 12:00
    
@Chris.V Use the key text width=4cm or the desired amount. If the text is larger, it will be broken in lines. And you can use \par or empty lines inside to start new paragraphs anyway. –  JLDiaz Jul 13 '13 at 12:15
1  
Perhaps the answers to this question can be helpful. –  Thorsten Donig Jul 13 '13 at 12:34

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.