fazilhussain
3 months ago

Relationship multiple foreign keys in pivot table

Posted 3 months ago by fazilhussain

I have 3 tables services levels deadlines. Suggest me the way to define relationship with packages (pivot table) in this scenario or should I change my table structure to store this data?

Packages (Pivot Table):

service_id  | deadline_id | level_id | price 
------------+-------------+----------+---------
   1        |     1       |     2    |   25.00
   1        |     1       |     1    |   24.00
   2        |     1       |     1    |   23.00

Please sign in or create an account to participate in this conversation.