-
Notifications
You must be signed in to change notification settings - Fork 0
/
figure-folded-form.tex
25 lines (23 loc) · 1.31 KB
/
figure-folded-form.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
\begin{figure}
\centering
\begin{tikzpicture}[entity diagram]
\node [set] (Dept) {Dept};
\node [set] (Emp) [right=of Dept] {Emp};
\coordinate (BetweenDeptAndEmp) at ($(Dept)!0.5!(Emp)$);
\node [set] (Void) [above=of BetweenDeptAndEmp]{Void};
\node [set] (Text) [below=of Dept] {Text};
\node [set] (Int) [below=of Emp] {Int};
\draw [->] (Void) to [bend right=10] node [map, right] {department} (Dept);
\draw [->] (Void) to [bend left=10] node [map, right] {employee} (Emp);
\draw [->] (Dept) to [bend right=5] node [map, right] {name} (Text);
\draw [->] (Dept) to [bend right=5] node [map, below] {employee} (Emp);
\draw [->] (Emp) to [bend right=5] node [map, right] {\;name} (Text);
\draw [->] (Emp) to [bend left=20] node [map, right] {\;position} (Text);
\draw [->] (Emp) to [bend left=5] node [map, right] {salary} (Int);
\draw [->] (Emp) to [bend right=5] node [map, above] {department} (Dept);
\draw [->] (Emp) to [loop right,out=60,in=10,looseness=7] node [map, right] {manager} (Emp);
\draw [->] (Emp) to [loop right,out=300,in=350,looseness=7] node [map, right] {subordinate} (Emp);
\end{tikzpicture}
\caption{Database schema in folded form}
\label{fig:folded-form}
\end{figure}