\ifx\TeXMaster\undefined
%
\documentclass{article}
\usepackage{pstricks,pst-node,pst-coil,color,pst-dbicons}
\addtolength{\topmargin}{-2.5cm}
\special{landscape}
\textheight17cm
\textwidth28cm
\evensidemargin-1.5cm
\oddsidemargin-1.5cm

\newcommand{\Mondial}{\textsc{Mondial}}

\begin{document}

\fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newif\ifblackwhite 
\blackwhitefalse
%\blackwhitetrue
\ifblackwhite
  \newgray{verylightgray}{0.95}
  \seticonparams{entity}{shadow=true,fillcolor=lightgray,fillstyle=solid}
  \seticonparams{attribute}{fillcolor=lightgray,fillstyle=solid}
  \seticonparams{relationship}{shadow=true,fillcolor=lightgray,fillstyle=solid}
\else
  \newrgbcolor{lightblue}{0.68 0.85 0.95}
  \newrgbcolor{verylightblue}{0.34 0.42 0.5}
  \newrgbcolor{lightgreen}{0.00 0.98 0.60}
  \newrgbcolor{verylightgreen}{0.00 0.5 0.30}
  \newrgbcolor{lightred}{1.00 0.71 0.76}
  \newrgbcolor{verylightred}{0.50 0.351 0.38}
  \seticonparams{entity}{shadow=true,fillcolor=lightred,fillstyle=solid}
  \seticonparams{attribute}{fillcolor=lightblue,fillstyle=solid}
  \seticonparams{relationship}{shadow=true,fillcolor=lightgreen,fillstyle=solid}
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ifx\TeXMaster\undefined
\begin{center}
{\huge\bf ER-Diagram of the \Mondial\ Database}
\bigskip
\end{center}
\fi

\thispagestyle{empty}

\psset{nodesep=0pt}

\hspace*{2cm}
\begin{tabular}{ccc}
 % lang/rel/ethn 
 \begin{tabular}{c}
 \entity{Language} \\[10em]
 \entity{EthnicGrp}[Ethnic Grp] \\[10em]
 \entity{Religion}\\[10em]
 \entity{Continent}
 \end{tabular}
 \hspace{8em}
 % cities/countries/provinces
 \begin{tabular}{c@{\hspace{8em}}c}
 &\entity[weak]{City} \\[2em]
 \entity{Organization}\\[12em]
 \entity{Country} \\[15em]
 \hspace*{-4.5cm}
 coordinates:
 &\entity[weak]{Province} \\
 \hspace*{-4.5cm}
    \attribute{coord}[coordinates]
 \end{tabular} 
 \hspace{8em}
 % geo
 \begin{tabular}{c@{\hspace{5em}}c}
 \entity{Lake} & \entity[weak]{Source} \\[7em]
 \entity{River} & \entity[weak]{Estuary}\\[6.5em]
 \entity{Sea}\\[6.5em]
 \entity{Island}\\[6em]
 \entity{Mountain}\\[7em]
 \entity{Desert}
  & \small{Mondial-III, 2015}
 \end{tabular}
\end{tabular}
\nodeconnections{\small
 \attributeof{coord}[3em]{20}{latitude}
 \attributeof{coord}[3em]{-20}{longitude}
%
 \relationshipbetween{Country}{City}{capital}(0.55)
 \relationshipbetween[ident]{Province}{City}{in}/\ncarc[arcangle=-20]/
 \relationshipbetween{Province}{City}{capital}(0.35)
% 
 \relationshipbetween{Country}{Organization}{ismember}[is\_member](0.6)
 \relationshipbetween{Organization}{City}{headq}
% 
 \relationshipbetween{Country}{Continent}{encompasses}(0.8)
% 
 \relationshipbetween{Country}
 /\ncline[nodesepB=-1.2cm,offsetA=0.1em,offsetB=0.4cm]/
                     {Country}
 /\ncline[nodesepB=-1.2cm,offsetA=-0.1em,offsetB=-0.4cm]/
                    {borders}(6em,0)
%
 \relationshipbetween{Country}(territory)
 /\ncline[nodesepB=-0.5cm,offsetA=0.1em,offsetB=2cm,linestyle=dotted]/
                     {Country}(from)
 /\ncline[nodesepB=-0.5cm,offsetA=-0.1em,offsetB=-2cm]/
                    {wasdependent}(13em,-90)
%
 \relationshipbetween{Country}(territory)
 /\ncline[nodesepB=-0.4cm,offsetA=0.1em,offsetB=1.5cm]/
                     {Country}(from)
 /\ncline[nodesepB=-0.4cm,offsetA=-0.1em,offsetB=-1.5cm]/
                    {dependent}(9em,-90)
%
 \relationshipbetween[weak]{Province}{Country}{of}
%
 \relationshipbetween{Province}{Lake}{in}
 \relationshipbetween{Province}{River}{in}
 \relationshipbetween{Province}{Sea}{in}
 \relationshipbetween{Province}{Mountain}{in}
 \relationshipbetween{Province}{Island}{in}
 \relationshipbetween{Province}{Desert}{in}
%
 \relationshipbetween{City}{Lake}{at}
 \relationshipbetween{City}{River}{at}
 \relationshipbetween{City}{Sea}{at}
 \relationshipbetween{City}{Island}{on}
 \relationshipbetween{Mountain}{Island}{on}[$\uparrow$on]
%                                %
 \relationshipbetween{Lake}{River}{out}
%
 \relationshipbetween{Island}{Sea}{islandin}[island\_in]
 \ncbar[armA=0.5cm,offsetA=0.2cm,offsetB=0.1cm]{Island}{Lake}
   \ncput[npos=1.22]{\relationship{IinL}[island\_in]}
 \ncbar[armA=1.6cm,offsetA=0.1cm]{Island}{River}
   \ncput[npos=1.23]{\relationship{IinR}[island\_in]}
%
 \relationshipbetween[weak]{River}{Source}{has}(0.45)
 \relationshipbetween[weak]{River}{Estuary}{has}/\ncarc[arcangle=-20]/
 \relationshipbetween{Estuary}{Lake}{to}/\ncarc[arcangle=-25]/(0.7)
 \relationshipbetween{Estuary}{River}{to}/\ncarc[arcangle=-15]/
 \relationshipbetween{Estuary}{Sea}{to}/\ncarc[arcangle=15]/(0.55)
%
 \ncbar[armA=0.5cm,offsetB=-0.1cm]{Estuary}{Province}
   \ncput{\relationship{EinP}[in]}
 \ncbar[armA=1cm,offsetB=0.1cm]{Source}{Province}
   \ncput{\relationship{EinP}[in]}
%
 \relationshipbetween{Sea}
    /\ncline[nodesepB=-1.2cm,offsetA=0.1em,offsetB=0.4cm]/{Sea}
    /\ncline[nodesepB=-1.2cm,offsetA=-0.1em,offsetB=-0.4cm]/{merges}(6em,0)
%
 \relationshipbetween{EthnicGrp}{Country}{belong}(0.3)
 \relationshipbetween{Religion}{Country}{believe}(0.3)
 \relationshipbetween{Language}{Country}{speak}(0.4)
%
 \attributeof{City}{145}[key]{name}
 \attributeof{City}{101}{pop.}
 \attributeof{City}[1.7em]{47}[mv]{pop.stat}
 \attributeof{pop.stat}[1.5em]{120}{pop.}
 \attributeof{pop.stat}[1.5em]{60}{year}
 \attributeof{City}{-22}{ctycoord}[coordinates]
 \attributeof{City}{-65}{elevation}
%
 \attributeof{Organization}[1.8em]{70}[key]{abbrev}
 \attributeof{Organization}{130}{name}
 \attributeof{Organization}[4em]{1800}{establ.}
%
 \attributeof{ismember}[1.6em]{50}{type}
%
 \attributeof{borders}[1.5em]{60}{length}
%
 \attributeof{Country}[3em]{145}{name}
 \attributeof{Country}{115}[key]{code}
 \attributeof{Country}{70}{pop.}
 \attributeof{Country}[4em]{40}[mv]{pop.stat}
 \attributeof{pop.stat}[1.5em]{120}{pop.}
 \attributeof{pop.stat}[1.5em]{60}{year}
 \attributeof{Country}[3em]{20}{area}
 \attributeof{Country}[4em]{170}{inf.mort}
 \attributeof{Country}[4em]{192}{pop.grw}
 \attributeof{Country}[5.5em]{-100}{unemploym.}
 \attributeof{Country}[3.5em]{-115}{indep.date}
 \attributeof{Country}[1.8em]{-125}{governm.}
 \attributeof{Country}[4em]{-70}{gdp.ind}
 \attributeof{Country}{-70}{infl.}
 \attributeof{Country}[5.5em]{-40}{gdp.serv}
 \attributeof{Country}[3em]{-30}{gdp}
 \attributeof{Country}[6.5em]{-20}{gdp.agr}
%
 \attributeof{Continent}{-60}[key]{name}
 \attributeof{Continent}{-120}{area}
%
 \attributeof{Language}[1.6em]{90}[key]{name}
 \attributeof{speak}[1.5em]{60}{percent}
%
 \attributeof{EthnicGrp}[1.6em]{90}[key]{name}
 \attributeof{belong}{90}{percent}
%
 \attributeof{Religion}[1.6em]{90}[key]{name}
 \attributeof{believe}{-90}{percent}
%
 \attributeof{encompasses}[4em]{-160}{percent}
 % 
 \attributeof{Province}{135}[key]{name}
 \attributeof{Province}[1.9em]{-100}{pop.}
 \attributeof{Province}[2.5em]{-50}{area}
 \attributeof{Province}[3em]{180}[mv]{pop.stat}
 \attributeof{pop.stat}[1.5em]{-120}{pop.}
 \attributeof{pop.stat}[1.5em]{-60}{year}
%
 \attributeof{Lake}{135}[key]{name}
 \attributeof{Lake}{90}{area}
 \attributeof{Lake}{45}{lkcoord}[coordinates]
 \attributeof{Lake}{170}{elevation}
 \attributeof{Lake}{210}{depth}
 \attributeof{Lake}[1.5em]{-60}{type}
%
 \attributeof{River}{120}[key]{name}
 \attributeof{River}[1.5em]{210}{length}
%
 \attributeof{Source}[2.2em]{172}{elevation}
 \attributeof{Source}[4em]{-85}{srccoord}[coordinates]
 \attributeof{Source}{-95}{mountains}
%
 \attributeof{Estuary}{-90}{estcoord}[coordinates]
%
 \attributeof{Sea}[1.5em]{90}[key]{name}
 \attributeof{Sea}[1.5em]{180}{depth}
%
 \attributeof{Mountain}{135}[key]{name}
 \attributeof{Mountain}[1.7em]{50}{mountains}
 \attributeof{Mountain}[4em]{5}{elevation}
 \attributeof{Mountain}[3em]{180}{type}
 \attributeof{Mountain}{-90}{mtcoord}[coordinates]
%
 \attributeof{Island}{140}[key]{name}
 \attributeof{Island}{45}{islands}
 \attributeof{Island}{180}{area}
 \attributeof{Island}{215}{type}
 \attributeof{Island}[3.5em]{-10}{elevation}
 \attributeof{Island}{-50}{islcoord}[coordinates]
%
 \attributeof{Desert}{135}[key]{name}
 \attributeof{Desert}{90}{area}
 \attributeof{Desert}[2em]{45}{descoord}[coordinates]
}

\ifx\TeXMaster\undefined
\end{document}
\fi

% Local Variables:
% TeX-command-default: "LaTeX"
% TeX-master: t
% End:
