Welcome Guest, Not a member yet? Register   Sign In
database structure for content types
#1

(This post was last modified: 12-07-2019, 09:00 AM by GHM.)

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
Reply
#2

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.
Reply
#3

(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.

In your case, separate tables.

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.
Reply
#4

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
Reply




Theme © iAndrew 2016 - Forum software by © MyBB