Mysql – Which foreign keys do I use if they are repeated

foreign keyMySQLrdbmsschema

I have the following two tables

company_relationships

|ID|Company_ID|Affiliate_ID|<Relationship Info>|
+--+----------+------------+-------------------+

jobs

|ID|Company_ID|<Job Info>|
+--+----------+----------+

and I need to keep a record of job offers (i.e. a company offers a job to its affiliate). Do I use:
job_offers

|ID|Job_ID|CompanyRelationship_ID|<Offer Info>|
+--+------+----------------------+------------+

or

|ID|Job_ID|Affiliate_ID|<Offer Info>|
+--+------+------------+------------+

or something else?

I want to use the first one, because relationship info applies to the job offer, but then Company_ID is specified by both Job_ID and CompanyRelationship_ID. Is there an issue with this / better schema to use?

Best Answer

If you go for the Option 1, how do you Identify the Affiliate? and that's why I think Option 2 is better, unless I am missing something