• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Schema for website comments

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Schema for website comments

    Hello all,

    I want to build a comments section into a website I am building.

    It's a personal project. Just wondering if anyone could share or point me towards a database schema that encompasses the typical entities of such a feature.

    #2
    I'd suggest just using wordpress.
    …Maybe we ain’t that young anymore

    Comment


      #3
      Originally posted by WTFH View Post
      I'd suggest just using wordpress.
      I want to do it in Angular. It's a learning process as much as anything - but I'd like to have a decent schema as a starting point.

      Comment


        #4
        Take a look at MiniBlog. You can have a look at how they have done it though they save to files rather than a db.

        https://github.com/madskristensen/MiniBlog

        Code specifically for comments

        https://github.com/madskristensen/Mi...ode/Comment.cs

        Comment


          #5
          It going to depend very much on what features you want in the comments section.

          Any more info on what you want to do?

          Comment


            #6
            Originally posted by Snarf View Post
            It going to depend very much on what features you want in the comments section.

            Any more info on what you want to do?
            Oh, the bare rudiments really. Probably doesn't justify an RDBMS solution so something as suggested by Woohoo or a JSON implementation are more likely to be suitable. I literally want to store the comment text, date of posting and associate it with its parent content.

            Comment


              #7
              Originally posted by The Castle Cary Fairy View Post
              Oh, the bare rudiments really. Probably doesn't justify an RDBMS solution so something as suggested by Woohoo or a JSON implementation are more likely to be suitable. I literally want to store the comment text, date of posting and associate it with its parent content.
              I might be misunderstanding, Apologies if so an this isnt what youre looking for:

              Comment


                #8
                Originally posted by Snarf View Post
                I might be misunderstanding, Apologies if so an this isnt what youre looking for:
                If there is a likelihood that you might want to capture comments against different content types (Stored in different tables) I'd maybe be tempted to change the way that the content links to its comments...




                The difference here is that the comment group table is allowing you to link multiple different types of content stored in different tables back to the one comments table whilst maintaining referential integrity.

                Let me know if you need more details/if thats not what youre looking for.

                Comment


                  #9
                  Originally posted by Snarf View Post
                  If there is a likelihood that you might want to capture comments against different content types (Stored in different tables) I'd maybe be tempted to change the way that the content links to its comments...



                  The difference here is that the comment group table is allowing you to link multiple different types of content stored in different tables back to the one comments table whilst maintaining referential integrity.

                  Let me know if you need more details/if thats not what youre looking for.
                  Thank you - I think that covers off all I need. It really is the simplest of implementations. So simple, in fact, that an RDBMS solution seems overkill. That said, I could be adding features in the future that would justify it so good to have something that is scalable from the outset.

                  Comment

                  Working...
                  X