I want to manage a n-label comment system and design a data base structure like this.
I am trying to design a database which supports comment moderation for unregistered users. The functionality I require is such that when a comment is posted
- If the user is registered it appears directly. otherwise;
- The post must be checked by a moderator before it appears.
Please suggest the possible changes to my database schema above to support this functionality.
It appears that you have more-or-less what you require in order to do what you want. The process when a user creates a new comment is as follows
When you pull out comments to show below a post you want a query like
This will pull out all approved comments (those from registered users, or from unregistered users which have been moderated), along with their username (for registered users this will be their username from the
RegisteredUsertable, for unregistered it will be what is saved alongside their comment in theBlogCommenttable)Lastly, when you want to pull out a list of posts for the moderator to moderate
You can then update the records they accept to
IsApproved=1.