Many-to-many relationship: use associative table or delimited values in a column?

后端 未结 9 1797
孤街浪徒
孤街浪徒 2020-12-16 13:48

Update 2009.04.24

The main point of my question is not developer confusion and what to do about it.

The point is to understand when delimite

相关标签:
9条回答
  • 2020-12-16 14:28

    It's almost always a big mistake to use comma separated IDs.
    RDBMS are designed to store relationships.

    0 讨论(0)
  • 2020-12-16 14:28

    The 'this is confusing to the developers' design means you have under-educated developers. It is the better relational database design - you should use it if at all possible.

    If you really want to use the list structure, then use a DBMS that understands them. Examples of such databases would be the U2 (Unidata, Universe) DBMS, which are (or were, once upon a long time ago) based on the Pick DBMS. There are likely to be other similar DBMS providers.

    0 讨论(0)
  • 2020-12-16 14:31

    My solution is to create an associative table as follows: This is confusing to the developers

    Really? this is database 101, if this is confusing to them then maybe they need to step away from their wizard generated code and learn some basic DB normalization.

    What you propose is the right solution!!

    0 讨论(0)
提交回复
热议问题