\makeatletter \tikzset{ database/.style={ path picture={ \draw (0, 1.5*\database@segmentheight) circle [x radius=\database@radius,y radius=\database@aspectratio*\database@radius]; \draw (-\database@radius, 0.5*\database@segmentheight) arc [start angle=180,end angle=360,x radius=\database@radius, y radius=\database@aspectratio*\database@radius]; \draw (-\database@radius,-0.5*\database@segmentheight) arc [start angle=180,end angle=360,x radius=\database@radius, y radius=\database@aspectratio*\database@radius]; \draw (-\database@radius,1.5*\database@segmentheight) -- ++(0,-3*\database@segmentheight) arc [start angle=180,end angle=360,x radius=\database@radius, y radius=\database@aspectratio*\database@radius] -- ++(0,3*\database@segmentheight); }, minimum width=2*\database@radius + \pgflinewidth, minimum height=3*\database@segmentheight + 2*\database@aspectratio*\database@radius + \pgflinewidth, }, database segment height/.store in=\database@segmentheight, database radius/.store in=\database@radius, database aspect ratio/.store in=\database@aspectratio, database segment height=0.1cm, database radius=0.25cm, database aspect ratio=0.35, } \makeatother