तरह
Cupon - is bound to -> Order;
Order - has active -> Cupon;
Cupon (
Id PK,
orderId FK Order.Id,
Unique ( Id, orderId) -- any superset of PK is unique
);
Order (
Id PK
ActiveCuponId,
(Id, ActiveCuponId) FK Cupon( OrderId, Id)
);
फिडल देखें https://dbfiddle.uk/?rdbms=sqlserver_2017&fiddle>02abfiddle.uk/?rdbms=sqlserver_2017&fiddle=596b305c