• 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

The Castle Cary Fairy

Should post faster
Thanks received
1
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.
 
It going to depend very much on what features you want in the comments section.

Any more info on what you want to do?
 
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.
 
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:

y4m0CjPGHnU64QtQ-S7GPLYkMYgijxvxr-U8Q9amlBiVWbLGEZuw4M9g4R9oJe4AcI-0VEmtt3JzRbko7hm-IYbshOPc-x3PSyTibVMaaGQOxokMB0pTo3oo6RkerXIv1yJga0VdNrhovQ_hr1lRZpBNtkXZP6GF0-FxGg09qP21mTkBrI5vZirl8AT8GLhW0a1CpKOGhqqEDdtosMYKewFFw
 
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...


y4mRmCgCjtsSn4GdWic0-PRdE3Ee2moDxSQ8PglzpoMYXx3eVfNNIb3Sb_XP03eBRsEQ8pKGM3MgIF6b1qaKq8qXcM_I_cWEVLrLilQQbFWaNAErmR0jJOQFFpjLuOyToVhMbk8RKmOvsHEK8ohF7XxxIL3nzV_zTQqePquzFunIb7-iOFxM6MvqU5li16k3W4FZ8UqiEt87FxrE9MrZuSGPw


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

Advertisers

Back
Top