\documentclass{article}[12pt]

%% Adam Shaw, April 2015
%% in conjunction with CMSC 23500, Spring 2015, Univ of Chicago

\setlength{\parskip}{8pt}
\setlength{\parindent}{0cm}

\newcommand{\assignment}{Homework 2}
\newcommand{\whoami}{Janet Q. Public}
\newcommand{\assignmentdate}{April d, 2015}

% various macros for relational algebra...
% edit, and supplement with your own

% rel : relation
\newcommand{\rel}[1]{\ensuremath{#1}}

% conj : conjunction
\newcommand{\conj}[2]{\ensuremath{#1 \wedge #2}}

% disj : disjunction
\newcommand{\disj}[2]{\ensuremath{#1 \vee #2}}

% nj : natural join 
\newcommand{\nj}[2]{\ensuremath{#1 \bowtie #2}}

% sel : select
\newcommand{\sel}[2]{\ensuremath{\sigma_{#1} #2}}

% proj : project
\newcommand{\proj}[2]{\ensuremath{\pi_{#1} #2}}

% ren : rename
\newcommand{\ren}[2]{\ensuremath{\rho_{#1} #2}}

% ...

\begin{document}

{\large \bf CMSC 23500: Introduction to Databases}

\assignment \\
\whoami \\
\assignmentdate

\hrulefill

% a few expressions to get you started...

\begin{enumerate}

\item \rel{r}

\item \nj{\rel{r}}{\rel{s}}

\item \sel{f>1}({\nj{\rel{r}}{\rel{s}}})

\item \ren{a \rightarrow b}(\proj{a}{\rel{r}}) 

\end{enumerate}

\end{document}
