Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. Architectural Question

Architectural Question

Scheduled Pinned Locked Moved Web Development
questiondatabasedesignjsondiscussion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    allia
    wrote on last edited by
    #1

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

    Z 1 Reply Last reply
    0
    • A allia

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

      Z Offline
      Z Offline
      ZoogieZork
      wrote on last edited by
      #2

      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

      A 1 Reply Last reply
      0
      • Z ZoogieZork

        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

        A Offline
        A Offline
        allia
        wrote on last edited by
        #3

        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-tableis smaller in field-size than the message-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.

        P 1 Reply Last reply
        0
        • A allia

          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-tableis smaller in field-size than the message-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.

          P Offline
          P Offline
          Paul Watson
          wrote on last edited by
          #4

          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?

          A 1 Reply Last reply
          0
          • P Paul Watson

            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?

            A Offline
            A Offline
            allia
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups