Function is to relation as functor is to?

Your definition makes perfect sense, and in essence it's nothing else but a subcategory of $C\times D$.

Note, however, the composition of two such relations does not necessarily satisfy the given properties, as we can have $\alpha:a\to b$ and $\beta:c\to d$ in $C$ with different objects $a,b,c,d$, and $a\sim x,\ b\sim y,\ c\sim y,\ d\sim z,\ \alpha\sim\xi,\ \beta\sim\eta$ with $\xi:x\to y,\ \eta:y\to z$ in $D$, then in the composition $\sim^{op};\sim$ we should have $\xi;\eta$ with itself, which is not guaranteed.

However, every such relation indeed gives rise to a profunctor (actually, one in both directions), by formally adding an arrow $c\to d$ [resp. $d\to c$] to the disjoint union of $C$ and $D$, whenever $c\sim d$, and define formal compositions with these, such that whenever $\alpha\sim\gamma$, the corresponding square is made commutative.


Sorry for my response is more like an extended comment than a real answer but the comments section is to small.

A relation between the sets $C$ and $D$ is a function $C \times D \to \{0,1\}$.

A function $f$ between the sets $C$ and $D$ is then a relation if you consider the following function $$ (c,d)\mapsto \chi_{\{d = f(c)\}} = \left\{ \array{1 \text{ if }d=f(c) \\ 0 \text{ otherwise}}\right. $$

A profunctor between $C$ and $D$ is a functor $D^{op}\times C \to \text{Set}$.

A functor $F$ between $C$ and $D$ is then a profunctor if you consider the following $$ (d,c) \mapsto \text{Hom}_D(d,F(c)). $$ You can see $\text{Hom}$ as a categorified characteristic function, it may be empty (corresponding to 0) if $d$ and $F(c)$ are not related, or it is non empty (corresponding to 1) if they are.

A functor $F:C\to D$ is a relator if seen in the following way :

  • $c\sim d $ iff $F(c) = d$
  • $u \sim f$ iff $F(u) = f$

The following discussion is wrong

Your device doesn't seem to produce a functor $D^{op}\times C \to \text{Set}$. Say you have a relator $R$ from $C$ to $D$, if $(d,c)$ is an object of $D^{op}\times C$, then I imagine you want to send it to the singleton if $c \sim_R d$ or the empty set otherwise. If we have a morphism $(u,v)$ between $(d_1,c_1)$ to $(d_2,c_2)$ where $u : d_2 \to d_1$ and $v : c_1 \to c_2$ here you get a problem of covariance, and even if you flip things around in your definition for $D$, then it may be the case that $d_1 \nsim_R c_2$ and $d_2 \sim_R c_1$, and you will have trouble defining a map from $\{*\} \to \emptyset$. I cannot see how to use the data of the relation on arrows to help with this issue.

Edit after Berci's answer, and a discussion in the comments

Don't know why I couldn't build a profunctor out of the given data but, following the link proposed by Berci, define $\chi : C^{op}\times D \to \text{Set}$, by

$$(c,d)\mapsto \coprod_{x\sim y} \text{Hom}_C(c,x)\times \text{Hom}_D(y,d)$$

Of course there is a symmetric profunctor $\xi : D^{op}\times C \to Set$, given by, $$(d,c)\mapsto \coprod_{x\sim y} \text{Hom}_D(d,y)\times \text{Hom}_C(x,c),$$ as anounced by Berci.