
私は、企業データベース インスタンスのすべてと、それらの相互関係、つまりデータベース リンクを表示しようとしています。TikZcylinder
を使用してジオメトリ シェイプを見つけました\usetikzlibrary{shapes.geometric}
が、TikZ 全般については初心者で、うまくいきませんでした。そこで、次の図のようなものを作成するのにご協力いただけないでしょうか。
インスタンスと矢印は山ほどありますが、皆さんが私にスタートを与えて、残りを自分でできるようにしたいと思っています。
答え1
非常に基本的なアプローチは次のようになります。
\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}
確かにあちこち改善できるところはあるでしょう。