Function is to relation as functor is to? I am told that the answer to the question in the title is a profunctor. However, below I sketch a different way that one could think about structure-preserving relations between categories. My questions are

*

*Is the thing I define below the same thing as a profunctor (for small categories at least)? If so, how can I see the connection?


*If not, does the thing I define have a name, and can it be satisfactorily defined in general, not just for small categories? And is it useful for anything?
Here's my definition:

Let $C$ and $D$ be small categories. Define a relator (for want of a better name) as a relation $\sim$ between ${\rm Ob}(C)$ and ${\rm Ob}(D)$ and a relation that I'll also denote $\sim$ between the morphisms of $C$ and the morphisms of $D,$ such that:

*

*For $P\in {\rm Ob}(C)$ and $X\in {\rm Ob}(D)$, if $P\sim X$ then ${\rm Id}_P \sim {\rm Id}_X$

*For morphisms $f:P\to Q$ in $C$ and $u:X\to Y$ in $D$, if $f\sim u$ then $P\sim X$ and $Q\sim Y$.

*For morphisms $f:P\to Q$ and $g:Q\to R$ in $C$, and $u:X\to Y$ and $v:Y\to Z$ in $D$, if $f\sim u$ and $g\sim v$, then $f;g \sim u;v$.


The point being that a functor is just a special case of this, in which every object in $C$ relates to exactly one object in $D$, and every morphism in $C$ relates to exactly one morphism in $D.$
I restricted it to small categories because a relation is a subset of the Cartesian product, which isn't defined for proper classes. I do not have a good idea about how it would generalise.
 A: 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. 
A: 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.
