【问题标题】:entity_id/entity_type terminology/pattern?entity_id/entity_type 术语/模式?
【发布时间】:2015-01-10 04:50:43
【问题描述】:

这样的架构是否有名称或模式:

movies
======
id

series
======
id


assets
======
entity_type  (i.e. 'movies' or 'series')
entity_id    (the id of either the movie or series record)
...

我不是在问这是一个好主意还是坏主意 - 只要它有一个名称和/或相关的模式。

谢谢!

【问题讨论】:

    标签: mysql database schema relational-database


    【解决方案1】:

    是的,它被称为多态关联。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-26
      • 2011-07-05
      • 2013-06-23
      • 2013-01-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多