Database design - articles, blog posts, photos, stories

前端 未结 3 1534
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 09:13

I\'m designing a database for a web site that will have at least 4 different object types represented (articles, blog posts, photos, stories), each of which have different e

3条回答
  •  情深已故
    2020-11-22 09:52

    You can use super-type/subtype in DB design to avoid that problem. Create a super-type for images, video, notes and then link to the super-type. Keep all common column in the super-type table.

    Here are few links to several similar questions/answers with models:

    • One
    • Two
    • Three
    • Four

提交回复
热议问题