# Drawing a hash table lookup scheme on overleaf engine with tikz package

As far as I know this is a Tikz table. Could you give me a background on how to make those fancy shadows as well as the dots between table cells? Also, any example of a similar table would be a precious gift to me.

So the questions are:

1. How to make table headings like on the right table?
2. How to place the searching pattern on the left of the table?
3. How to draw shadows even for comparison operation at the bottom?
4. What is the command for big ldots between the cells?

1. As you don't want the header of the table to have a shadow, I made two separate tables. One for the heading and one for the table itself.
2. Same as the other tables
3. Use the tikzlibrary shadows and add to drop shadow to the option list of your node.
4. For the \ldots I used a \scalebox.

Arrows are positioned using the tikzlibrary calc

Code:

\documentclass[tikz,border=2mm]{standalone}
\usepackage{array}

\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\begin{document}
\begin{tikzpicture}[>=latex,every node/.style={anchor=south west,,inner sep=0,fill=white}]
\node[drop shadow,circle,fill=gray!20,draw] at (5.4,0) (comparison) {=?};
\begin{tabular}{|C{1cm}|C{2cm}|C{3cm}|}
\hline
& & \\ \hline
\end{tabular}
};
\node at (5,2.7) {
\begin{tabular}{C{6.7cm}}
\scalebox{5}{...}
\end{tabular}
};
\node[drop shadow] at (5,3.5) (table) {
\begin{tabular}{|C{1cm}|C{2cm}|C{3cm}|}
\hline
& & \\ \hline
& & \\ \hline
& & \\ \hline
& & \\ \hline
& & \\ \hline
& & \\ \hline
& & \\ \hline
\end{tabular}
};
\node at (5,6.6) {
\begin{tabular}{C{1cm}C{2cm}C{3cm}}
\end{tabular}
};
\node[drop shadow] at (0,7) (search) {
\begin{tabular}{|C{2cm}|C{1cm}|}
\hline
tag & index \\
\hline
\end{tabular}
};
\draw[->] ($(search.south west)!.3!(search.south east)$) |- (comparison.west);
\draw[->] ($(search.south west)!.8!(search.south east)$) |- (table.west);
\draw[->] ($(comparison.north)+(0,4.6)$) -- (comparison.north);
\draw[->] ($(comparison.north)+(2,4.6)$) |- (comparison.east);
\draw[->] ($(comparison.north)+(5,4.6)$) -- ($(comparison.north)+(5,-2)$);
\draw[->] ($(comparison.south)$) -- ($(comparison.north)+(0,-2)$);
\end{tikzpicture}
\end{document}


• Thank you! Everything except capital C and commands for cell width are working on overleaf, but it's not the big problem. – Constantin Novikov Jun 18 '15 at 11:53