fortunejs / fortune-postgres

Postgres adapter for Fortune.
MIT License
23 stars 21 forks source link

Any plans for join tables for many-to-many? #15

Closed itsravenous closed 8 years ago

itsravenous commented 8 years ago

As opposed to integer[] columns. Or any thoughts on why it's not worth implementing. I've read lots of conflicting opinions on join tables vs array columns for many to many relationships. I think I would be more comfortable with join tables (I've mainly worked with MySQL and SQLServer) but Fortune is such a good fit for my current needs I'm loathe to leave it for potentially unfounded worries.

gr0uch commented 8 years ago

From what I've heard, arrays are faster, or at least on par with join tables for performance. The only caveat is that Postgres doesn't have foreign key constraint for arrays, and there are no current plans for this feature.

itsravenous commented 8 years ago

Fair enough! I'll see how I get on :)