Jump to content

Help Designing Relational Database


kirk112

Recommended Posts

Hi

 

I am trying to design an article website and have got a mental block over the best way to design the database, I have attached a screenshot of the current design (please ignore the column types), I will try to best explain the problem below, please let me know if you need any additional information

 

An article can be in any number of categories (article_to_category table) all the articles have set values which are stored in the article_content. Depending on the type of the article it can have additional attributes which are stored in the report, article, event, viewpoint tables.

 

The problem is there is not direct link between the article_content table and the attributes in the above tables, I would have to union all the tables together and workout which of the values I need to display.

 

I have looked at a EAV model and feel it's not the correct way to go. I have thought about combining the report, article, event, viewpoint tables into the article_content and making the column NULL but this feels 'wrong'.

 

Thanks for your advice, please let me know if you need any further explanation

 

[attachment deleted by admin]

Link to comment
Share on other sites

Thanks for the reply,

 

They all have a article_content_id, and if I select an article from report, article, event or viewpoint I will be able to join the article content and other related information, but if I do a search on the article_content table I will not know which table to join to it as it can be 1 of 4

 

Regards

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.