Is it possible for total participation constraints to be enforced by an attribute?
This would be one way to enforce the constraint.



-- User USR exists.
--
user {USR}
  PK {USR}


-- Restaurant RST exists.
--
restaurant {RST}
        PK {RST}


-- Fare (food, drink) FAR exists.
--
fare {FAR}
  PK {FAR}


-- Restaurant RST serves fare FAR.
--
menu {RST, FAR}
  PK {RST, FAR}

FK1 {RST} REFERENCES restaurant {RST}
FK2 {FAR} REFERENCES fare       {FAR}


-- User USR placed (his/her) order number ORD#,
-- from restaurant RST.
--
order {USR, ORD#, RST}
   PK {USR, ORD#}
   SK {USR, ORD#, RST}

FK1 {USR} REFERENCES user       {USR}
FK2 {RST} REFERENCES restaurant {RST}


-- User USR ordered QTY of fare FAR
-- from restaurant RST in (his/her) order number ORD#,
-- as item number ITM# of that order.
--
order_item {USR, ORD#, RST, ITM#, FAR, QTY}
        PK {USR, ORD#, RST, ITM#}
        AK {USR, ORD#, RST, FAR}

  FK1 {USR, ORD#, RST} REFERENCES
order {USR, ORD#, RST}

 FK2 {RST, FAR} REFERENCES
menu {RST, FAR}




Note:

All attributes (columns) NOT NULL

PK = Primary Key
AK = Alternate Key   (Unique)
SK = Proper Superkey (Unique)
FK = Foreign Key


Using suffix # to save on screen space.
Works for SQL Server and Oracle, for others use _NO.
For example, rename ORD# to ORD_NO.