one-to-many relationship

one-to-many relationship

hzhonghzhong Posts: 26Questions: 9Answers: 0

How should I choose whether to use one-to-many join with a link table, or to implode the values of checkbox into a string with the separator and store as a text field directly?

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    It really depends on your database schema. If you have an existing schema, then the decision is already made for you. If you get to decide what the schema is, I'd suggest using a link table as it gives more flexibility and provides referential integrity.

    Allan

  • hzhonghzhong Posts: 26Questions: 9Answers: 0

    Thanks allan.

Sign In or Register to comment.