0

I was looking at the notation from the textbook I'm using to learn relational algebra and other DBMS related information, and I noticed that I don't know how to typeset the symbol shown below.

Image from textbook

I know there is a command in the amssymb package and related packages to produce the standard unicode symbols for outerjoins. Is there a package somewhere using this symbol?

1
  • Welcome to tex.sx. You can add \circ above the join symbol using \stackrel (in amsmath). Commented Feb 20, 2023 at 3:46

2 Answers 2

1

You might use \overset{\circ}{\bowtie} to get

enter image description here

However, this doesn't really resemble the symbol you show. You can try

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}

\makeatletter
\newcommand{\circleouterjoin}{\mathrel{\mathpalette\circleouterjoin@\relax}}
\newcommand{\circleouterjoin@}[2]{%
  \ooalign{%
    \hidewidth\raisebox{1.1\height}{\scalebox{0.9}{$\m@th#1\circ$}}\hidewidth\cr
    $\m@th#1\bowtie$\cr
  }%
}
\makeatother

\begin{document}

The \emph{outerjoin} $R\circleouterjoin S$

In subscripts $X_{R\circleouterjoin S}$

\end{document}

enter image description here

You may play with 0.9 (scaling factor) and 1.1 (raising factor) until you're fully satisfied.

You might not be happy with \bowtie that has “interlacing”.

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}

\makeatletter
\newcommand{\outerjoin}{%
  \mathrel\triangleright
  \mathrel{\mkern-2mu}%
  \mathrel\triangleleft
}
\newcommand{\circleouterjoin}{\mathrel{\mathpalette\circleouterjoin@\relax}}
\newcommand{\circleouterjoin@}[2]{%
  \ooalign{%
    \hidewidth\raisebox{1.1\height}{\scalebox{0.9}{$\m@th#1\circ$}}\hidewidth\cr
    $\m@th#1\outerjoin$\cr
  }%
}
\makeatother

\begin{document}

The \emph{outerjoin} $R\circleouterjoin S$

In subscripts $X_{R\circleouterjoin S}$

\end{document}

enter image description here

Explanation: in \bowtie the backing up is 3mu.

1

With :

\documentclass[11pt]{article}
\usepackage{mathtools}
\newcommand{\outerjoin}{\overset{\circ}{\bowtie}}
\begin{document}
The \emph{outerjoin} $R \outerjoin S$.
\end{document}

you obtain:

enter image description here

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.