
\section{Overview}
Throughout this paper the example in figure~\ref{fig:example_er} will
be used.

% diagrams of s1 and s2
\begin{stdfigure}{Example ER schemas}{fig:example_er}

\stdpicmag{-2}
\begin{small}

\def\schema(#1,#2)(#3,#4)#5#6{\setlength{\fboxsep}{0em}
\put(#1,#2){\colorbox{lightgrey}{\makebox(#3,#4){}}}
\put(#1,#2){\begin{picture}(#3,#4)
#6
\end{picture}}
\put(#1,#2){\makebox(2,2){\tt #5}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% s1
%\setlength{\unitlength}{1cm}
\begin{picture}(58,25)
\schema(3,0)(24,23){s1}{\entity(14,2){\tt person}
\cardattribute(14,6)(8,7){\tt sex}{\tt 1:1}{\tt 1:N}
\cardattribute(14,4)(6,4){\tt name}{\tt 1:1}{\tt 1:N}
\cardattribute(14,2)(8,1){\underline{\tt id}}{\tt 1:1}{\tt 1:1}
\relationship(18,6)(18,18){\tiny \tt worksin}{\tt 1:1}{\tt 1:N}
\entity(14,18){\tt dept}
\cardattribute(14,20)(8,20){\underline{\tt dname}}{\tt 1:1}{\tt 1:1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% s2
\schema(29,3)(32,18){s2}{\entity(12,13){\tt person}
\entity(7,1){\texttt{male}}
\entity(17,1){\texttt{female}}
\generalisation(13,9){\tt sex}
\path(11,5)(11,7)(21,7)(21,5)
\path(16,7)(16,9)
\isa(16,11)(16,13)
\cardattribute(12,14)(6,13){\underline{\tt id}}{\tt 1:1}{\tt 1:1}
\cardattribute(12,16)(6,17){\tt name}{\tt 1:1}{\tt 1:N}
\cardattribute(20,15)(26,15){\tt dname}{\tt 1:1}{\tt 1:N}}
\end{picture}

\end{small}
\end{stdfigure}

First we will give a brief description of the MDR and STR.  Then the
reps API will be described by giving example code that uses the API to
construct a basic ER modelling langauge and then uses that language to
construct the schemas in the example.

We will give the schemas of the MDR and STR and the data that would be
produced by the example code for the reps API as well as some other
examples of data for more complex scenarios.
