Architectural Question
-
Some design issues come to mind when building a new system and you do look for answers on the best sites... That said, I would appreciate the input you can give me on the following dilemma: :sigh: Codeproject has a discussion attached to every article. Moreover I noticed that it uses the same code all around the site, even in these Message Boards. So some questions comes to mind - does each article own a different forum? wouldn't that expand the database? How are the "Message Boards" differentiated from the rest of the articles - by hand or code? I was thinking of an alternative. Maybe instead of opening unique forums for every article, only open a new Thread in a specific "article-discussions" forum. That way, each article gets a thread, but no new forums are created each time. Each Thread can have son messages, but the user doesn't know that this is the case... Does anybody see this as problematic? Does anyone have another suggestion? Does codeproject follow correctly my assumptions? I would appreciate any input one can offer. Thanks in advance, Allia. I live to code...
-
Some design issues come to mind when building a new system and you do look for answers on the best sites... That said, I would appreciate the input you can give me on the following dilemma: :sigh: Codeproject has a discussion attached to every article. Moreover I noticed that it uses the same code all around the site, even in these Message Boards. So some questions comes to mind - does each article own a different forum? wouldn't that expand the database? How are the "Message Boards" differentiated from the rest of the articles - by hand or code? I was thinking of an alternative. Maybe instead of opening unique forums for every article, only open a new Thread in a specific "article-discussions" forum. That way, each article gets a thread, but no new forums are created each time. Each Thread can have son messages, but the user doesn't know that this is the case... Does anybody see this as problematic? Does anyone have another suggestion? Does codeproject follow correctly my assumptions? I would appreciate any input one can offer. Thanks in advance, Allia. I live to code...
allia wrote: does each article own a different forum? wouldn't that expand the database? What do you mean by "expand the database"? Something like this could be handled by simply having a table of forums and having each message know the forum it belongs to and what message it is in reply to (with all the appropriate indexes to keep things speedy). - Mike
-
allia wrote: does each article own a different forum? wouldn't that expand the database? What do you mean by "expand the database"? Something like this could be handled by simply having a table of forums and having each message know the forum it belongs to and what message it is in reply to (with all the appropriate indexes to keep things speedy). - Mike
What I ment by "expand the database" is that for EACH article a new forum record is inserted into the "table of forums". This in time, enlarges the amount of data in the database. I suggested a different approach that doesn't insert a new record, but uses an existing forum to open a new thread. Each thread is assigned to an article. I don't know what to make of this since if I take it to the extreme case, where nobody writes comments, then I am better off with the regular approach since the
forums-table
is smaller in field-size than themessage-table
field-size. Does any body have a different take on this issue? Again, I direct you to my list of questions from which this discussion started. Thanks in advance. Allia. I live to code. -
What I ment by "expand the database" is that for EACH article a new forum record is inserted into the "table of forums". This in time, enlarges the amount of data in the database. I suggested a different approach that doesn't insert a new record, but uses an existing forum to open a new thread. Each thread is assigned to an article. I don't know what to make of this since if I take it to the extreme case, where nobody writes comments, then I am better off with the regular approach since the
forums-table
is smaller in field-size than themessage-table
field-size. Does any body have a different take on this issue? Again, I direct you to my list of questions from which this discussion started. Thanks in advance. Allia. I live to code.Why not do away with the Forums table all together then and have the forum the thread is targeted at as a column of the thread record. Well naturally the answer is simple and is why relational databases exist; What happens when your Forum wants more than one piece of data asssociated with it? e.g. Name and Description. With the above method both the Name and Description has to be recorded for each and every thread. Ouch. But you said just for article forums. But then you would need different code to access and parse the data records. One set of code for article forums and another for "normal" forums. That increases complexity and so introduces more points for bugs to creep in, makes maintenance harder and a host of other issues. Also, and I may be wrong on this, but a select based on a foreign key integer value is faster than a select filtering through a string field. regards, Paul Watson Bluegrass South Africa Anna-Jayne Metcalfe wrote: "Cynicism has it's place in life - but it should be kept well away from your inner self." Crikey! ain't life grand?
-
Why not do away with the Forums table all together then and have the forum the thread is targeted at as a column of the thread record. Well naturally the answer is simple and is why relational databases exist; What happens when your Forum wants more than one piece of data asssociated with it? e.g. Name and Description. With the above method both the Name and Description has to be recorded for each and every thread. Ouch. But you said just for article forums. But then you would need different code to access and parse the data records. One set of code for article forums and another for "normal" forums. That increases complexity and so introduces more points for bugs to creep in, makes maintenance harder and a host of other issues. Also, and I may be wrong on this, but a select based on a foreign key integer value is faster than a select filtering through a string field. regards, Paul Watson Bluegrass South Africa Anna-Jayne Metcalfe wrote: "Cynicism has it's place in life - but it should be kept well away from your inner self." Crikey! ain't life grand?
Paul Watson wrote: But then you would need different code to access and parse the data records Paul, why would I need a seperate code? couldn't I just use the same code of the
view-thread
? just as though I would direct you to http://www.codeproject.com/script/comments/forums.asp?forumid=1640&select=660732&df=100&tid=660732#xx660732xx [modified: I think I understand why - It's because the New Thread option wouldn't add a thread in the appropriate place...] Finally, I didn't understand your comment: Why not do away with the Forums table all together then and have the forum the thread is targeted at as a column of the thread record Thanks for the input, Allia.