Let's say we have a system that executes 'jobs'. These jobs can be wired up into sequences we call 'integrations' which are effectively an ordered set of jobs.
The classic solution would be a join table:
integrations: id, name
jobs: id, name, commands
integrations_jobs: id, integration_id, job_id, integration_order
where integration_order
is the position of that integration_job within the integration.
What if instead we just used a postgres array?
integrations: id, name, [job_id1, job_id2, job_id3]
jobs: id, name, commands
Are there any obvious drawbacks I'm missing with using an array instead of a join table? We are using Rails 5 and Postgres on Heroku.