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

后端 未结 9 1798
孤街浪徒
孤街浪徒 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:18

    The many-to-many mapping you are doing is fine and normalized. It also allows for other data to be added later if needed. For example, say you wanted to add a time that the category was added to the document.

    I would suggest having a surrogate primary key on the document_category table as well. And a Unique(documentid, categoryid) constraint if that makes sense to do so.

    Why are the developers confused?

提交回复
热议问题