Q:

Can "relations" between topological spaces be composed?

(In what follows, $\Omega = \{0,1\}.$)
In set theory, we can define that a relation $X \rightarrow Y$ is a function $X \rightarrow \mathcal{P}(Y)$. This is the same as a subset of $X \times Y$, by the following argument. $$\mathcal{P}(X \times Y) \cong \Omega^{X \times Y} \cong (\Omega^Y)^X \cong \mathcal{P}(Y)^X$$
It turns out relations can be composed, and they're pretty useful. I was thinking of setting up something similar in the world of topological spaces. Define that a relation $X \rightarrow Y$ is a sheaf on $X$ valued in the topos $\mathrm{Sh}(Y)$. I'm not quite sure why I'm defining this, but I'm hopeful that there might be a connection to multivalued-functions.
I'm not sure if this is the same as a sheaf of sets on $X \times Y$.
Anyhoo:

Question. Can "relations" between topological spaces be composed?

A:

Yes. I'll take the definition to be a sheaf on $X \times Y$, although I think $\text{Sh}(Y)$-valued sheaf on $X$ is equivalent. If $F \in \text{Sh}(X \times Y)$ is a sheaf and $G \in \text{Sh}(Y \times Z)$ is a sheaf, then their composition $F \circ G \in \text{Sh}(X \times Z)$ is given by

taking the external product $F \boxtimes G \in \text{Sh}(X \times Y \times Y \times Z)$, 
pulling back along the diagonal map $\Delta : Y \to Y \times Y$, then 
pushing forward along the map $Y \to \text{pt}$. 

This is a categorification of a similar recipe for composing linear transformations $V \to W$, thought of as elements of $V^{\ast} \otimes W$, by first taking external tensor products and then taking a trace inside. Composition of relations can also be understood in this way. 
The general keyword for constructions of this form is "integral transforms on sheaves" although it is usually done for sheaves on schemes (as in the Fourier-Mukai transform); see, for example, the nLab. 

