Say for example I have in table SITES a unique key set to include fields site, permission and I want to use a foreign key to keep the same reference keyed to match site, permission in table USERS. Is it possible to create a relation that uses multi-key indexes in mysql? I can resolve this programmatically also, however I would prefer to keep referential integrity constrained to the data layer if at all possible. Using single relations could potentially lead to a record being inserted with the wrong permission but the correct site, or vice versa.
Thanks in advance.