database structure for content types |
Hi, We have 5 or 6 content types, for example:
Articles Forums podcast Videos shop and ... separate table for them? or one node table (according to "type" field) for all content type? this system is user centric and have a comment table for all content types. please guide me how to design this database. Thanks
It depends on what type of content you are going to store about the different things. Are you for an example making 10 different types of articles (news, contests ...), store them as article.
In your case, separate tables. (12-08-2019, 02:07 AM)jreklund Wrote: It depends on what type of content you are going to store about the different things. Are you for an example making 10 different types of articles (news, contests ...), store them as article. news, articles and the like them... saving the article table. But I don't know structure for forum, video, podcast and shop. But i can create a "node" table for all content types and Separate by the "node_type" field.
Hello,
The best is to have one abstract table 'Content' and some concrete tables 'Article', 'Forum' ... that inherit from 'Content'. If an association involves all Contents, you link it to the table 'Content'. And if an association involves only the Articles, you link it to the table 'Article'. I've created an ORM that manages it: https://github.com/vmoulin78/concorde Vincent |
Welcome Guest, Not a member yet? Register Sign In |