[tt]
mysql> create table test (xx int not null, yy int not null, PRIMARY KEY mykey (xx, yy));
Not sure what you mean by the "reference" part but...
mysql> insert into test values (1,2);
Query OK, 1 row affected (0.00 sec)
mysql> insert into test values (1,3);
Query OK, 1 row affected (0.00 sec)
mysql> insert into test values (1,4);
Query OK, 1 row affected (0.00 sec)
mysql> select * from test where xx = 1 and yy = 2;
+----+----+
| xx | yy |
+----+----+
| 1 | 2 |
+----+----+
1 row in set (0.00 sec)
mysql> insert into test values (1,2);
ERROR 1062: Duplicate entry '1-2' for key 1
[/tt]
grrr... can't get the "tt" tags to work