EAV-like table with both primary column pointing to the same foreign column
A simple CHECK constraint works just fine:

$ sqlite
SQLite version 3.8.4.1 2014-03-11 15:27:36
...
sqlite&gt; CREATE TABLE table_B(
   ...&gt;     user1,
   ...&gt;     user2,
   ...&gt;     [other stuff],
   ...&gt;     CHECK (user2 &lt; user1)
   ...&gt; );
sqlite&gt; INSERT INTO table_B VALUES (1, 0);
sqlite&gt; INSERT INTO table_B VALUES (2, 3);
Error: CHECK constraint failed: table_B


(This has nothing to do with EAV.)