To make schema diagram
I use following code
\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{calc,positioning,shapes.multipart,shapes}
\begin{document}
\tikzset{basic/.style={
draw,
rectangle split,
rectangle split parts=2,
rectangle split part fill={blue!20,white},
minimum width=2.5cm,
text width=2cm,
align=left,
font=\itshape
},
Diamond/.style={ diamond,
draw,
shape aspect=2,
inner sep = 2pt,
text centered,
fill=blue!10!white,
font=\itshape
}}
\begin{tikzpicture}
\node[basic] (instructor) {instructor
\nodepart{second}
\underline{ID}\\
name\\
dept\_name\\
salary};
\node[basic,right=5cm of instructor] (department) {department
\nodepart{second}
\underline{dept\_name}\\
building\\
budget};
\draw[->] ([yshift=-13pt]$(instructor.east)$) -- ([yshift=1pt]$(department.west)$);
\end{tikzpicture}
\end{document}
In line \draw[->] ([yshift=-13pt]$(instructor.east)$) -- ([yshift=1pt]$(department.west)$); I make a yshift. To do this edit the yshift value several time to fit the output with expectation. If I know the distance of each item in the diagram from the top or bottom I can easily make decision for yshift value just multiplication item no and distance.
Something like \draw[->] ([yshift=-((3.5*distance)pt]$(instructor.north)$) -- ([yshift=-(1.5*distance)pt]$(department.north)$);;
Or,
\draw[->] ([yshift=-((1.5*distance)pt]$(instructor.south)$) -- ([yshift=-(2.5*distance)pt]$(department.south)$);;



basicstyle – Zarko Mar 30 '18 at 18:29basicstyle... ;-) – Mar 31 '18 at 00:15