Hey all;

I'm working on a forum/blog engine, and I basically want some opinions on whether or not I should separate the forum and blog as two separate entities or combine them into some hybrid type of table.

At the moment, I'm working on the ER diagram, and they're separate, but I'm wondering if thats the best way to go. In my way of thinking, the site editors will be making use of the site's blog, while the users will make use of the forum(mods will just supervise); thats why I'm using separate tables & such.

But then, I end up having very similar tables related to them such as the report table where people flag a post or flag a blog response. The tables are pretty much exactly the same except for the post/blog id field. Should I just make one table with two fields one for a blog id (if its a blog response that's being reported) and one for a post id?

Your thoughts are appreciated.

Recommended Answers

All 5 Replies

I would tend to think that Blogs and forum entries are of the same nature: a blob of text, classified in a particular section, with a publication date, an author and possibly answers ... To me they look the same bar one field saying 'hey I am a blog entry' or 'Hello, I am a forum entry' and will allow to display them, or not in this section or that section of the web site.

Just my 0.02EUR

Blog and forum entries must and should be stored in separate tables.

That's a physical decision, but from a logicalpoint of view, I don't see any differences between the two. Would you care to explain why you are so adamant about 'must and should'

I am not sure if you understand how a blog and a forum threads are treated.

In a thread
1. there could be multiple reply
2. a thread can be marked as solved.
3. it can be made a sticky .
4. one answer is marked as best answer.
5. a thread my receive some up or down vote.
6. there may be some infraction points.

A blog may or may not have any of the above on it.

Still you want to store the both in a single table , you need to maintain a lot of flags.

Ha, now we're getting somewhere, this is much more informative than a simple 'must and should', thanks for taking the time;

I would be tempted to say that for the sake of 3-4 flags, I'd still go for the single entity BUT I'd also say that a blog entry can be indexed with keywords, whilst a thread would not; a thread would have a strong parent-child and siblings relationship, whilst blog entries would probably not.

The last points implying so external entities relations, would IMHO, more relevant to the decision "one or two entities" than a mere couple of flags;

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.