2 years ago

One-to-many Using Bridge Table

Posted 2 years ago by s1rc

I'm setting up relationships between models and I'm wondering if there's any harm using a bridge table for a one-to-many relationship?

i.e. These are some of the models

  • User
  • Team
  • Group

Each User may or may-not have a Team or Group. Would it be better to have nullable FK's in the User model for team_id, group_id, or is using bridge tables team_user, group_user acceptable? (There is little chance this will ever be a many-to-many relationship)

Would there be any ill effects in using a bridge table for one-to-many?

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