Newer
Older
Publications / Figures / Properties / Properties.tex
\documentclass[10pt]{article}

\usepackage{pstricks}
\usepackage{a4wide}
\usepackage{amsmath}

\pagestyle{empty}

\begin{document}

	\begin{pspicture}(6,6.2)
		\sffamily
		
		\psset{linewidth=0.5pt}
		
		% data store symbol
		\psline(3.9,2.4)(0.9,2.4)(0.9,1.4)(3.9,1.4)
		\psline(1.5,2.4)(1.5,1.4)
		\rput(1.2,1.9){D1}
		\rput(2.7,1.9){Purchase}
		
		% incoming data flow
		\psline(6,1.9)(3.9,1.9)
		\psline(4.4,2.1)(3.9,1.9)(4.4,1.7)
		
		% outgoing data flow
		\psline(2.4,1.4)(2.4,0)
		\psline(2.2,0.5)(2.4,0)(2.6,0.5)
		
		\psset{linestyle=dashed}
		
		% properties box and lines
		\psline(1.5,2.4)(2.3,5.8)
		\psline(1.5,1.4)(2.3,3.4)
		\psline(3.9,2.4)(4.9,5.8)
		\psline(3.9,1.4)(4.9,3.4)
		\psframe[fillcolor=white,fillstyle=solid](2.3,3.4)(4.9,5.8)
		\rput(3.6,4.6){\shortstack{purchase\_id \\ purchase\_date \\ purchase\_price \\
								   customer\_no \\ salesrep\_id \\ registration}}

		\psset{linestyle=solid,linecolor=gray,linewidth=2pt,arrows=->}
		\rmfamily\itshape

		% text labels & arrows
		\uput[120](0.4,3){label}
		\psline(0.4,3)(1,2.1)
		
		\uput[230](1.3,0.7){name}
		\psline(1.3,0.7)(2.1,1.7)
		
		\uput[250](4.4,0.7){flows}
		\psline(3.7,0.5)(2.5,0.8)
		\psline(4.4,0.7)(4.9,1.8)
		
		\rput[bl](2.3,5.8){fields}
		
	\end{pspicture}

\end{document}