Да, три таблицы.
Попробуйте что-то вроде этого:
use tempdb
create table Person
(
Id int primary key,
Name varchar(200)
)
create table Request
(
Id int primary key
)
create table Request_Person
(
RequestId int not null references Request,
PersonId int not null references Person,
RequestRole int not null,
constraint ck_max_two_people_per_request check (RequestRole in (1,2)),
constraint pk_Request_Person primary key (RequestId, PersonId),
constraint ak_Request_Person unique(PersonId),
constraint uq_Request_RequestRole unique (RequestId,RequestRole)
)
go
insert into Request(id) values (1),(2),(3)
insert into Person(id,name) values (1,'Alice'),(2,'Fred'),(3,'Jo')
insert into Request_Person(RequestId,PersonId,RequestRole)
values (1,1,1),(1,2,2)
insert into Request_Person(RequestId,PersonId,RequestRole)
values (2,2,1) --Violation of UNIQUE KEY constraint 'ak_Request_Person'
insert into Request_Person(RequestId,PersonId,RequestRole)
values (1,3,3) --The INSERT statement conflicted with the CHECK constraint "ck_max_two_people_per_request"