Database Structure For Articles and Categories
Hi - This is a question about database structure - please help. Thanks
For a website with many subjects or themes is it best to use 1 big table to hold or the articles or many small tables to hold articles for different subjects - I will explain what I mean.
Say my website has a 'cooking' section, a 'sports' section and a general 'blog' section.
In each section the articles will be organized into different sub-categories but I can't see a way to do this.
Case 1: All the articles are stored in 1 table. There is a second table which 'assigns' an article to a category (the cateogries themselves are stored in a separate table) and also assigns a sub-category (sub-categories stored in a separate table???) and then what if there needed to be a sub-sub-cateogry?? This just doesn't seem to work well!
Case 2: For each theme there is a separate table - Cooking Table, Sports Table, Blog Table. And for each separate table there is a categories table Cooking-Categories which assigns each cooking article a sub-cateogry (and the sub-categories are stored in a separate table also) - and what if I needed to make a sub-sub-category - then would I need to make another table? This just sounds like a lot of tables even though the end result would probably be easier!
Case 3: All categories are stored in 1 table - as well as all subcateogires of those categories as well as all sub-sub categories, etc (each with an ID)... Each article is 'assigned' a category ID
Please someone show me the light! I am confusing myself.
Thanks
Chris
