Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7876765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:13:10+00:00 2026-06-03T03:13:10+00:00

I want to manage a n-label comment system and design a data base structure

  • 0

I want to manage a n-label comment system and design a data base structure like this.my database structure

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:13:12+00:00Added an answer on June 3, 2026 at 3:13 am

    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

    if the user is registered, and not blocked
      create BlogComment record with:
              IsApproved=true
              IsBlocked=false
              UserId=registered userId
              UserName = null
    if the user is registered and blocked
      create BlogComment record with 
              IsApproved=false
              IsBlocked=true
              UserId=registered userId
              UserName = null 
    if the user is unregistered
      create BlogComment record with
             IsApproved=false
             IsBlocked=false
             UserId=null
             UserName=user's name
    

    When you pull out comments to show below a post you want a query like

    SELECT Comment, ISNULL(bc.UserName, ru.UserName) AS UserName
    FROM BlogComment bc
    LEFT JOIN RegisteredUser ru
       ON bc.UserId = ru.Id
    WHERE postId=<current PostId>
    AND IsApproved=1
    

    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 RegisteredUser table, for unregistered it will be what is saved alongside their comment in the BlogComment table)

    Lastly, when you want to pull out a list of posts for the moderator to moderate

    SELECT * 
    FROM BlogComment
    WHERE IsApproved=0 
    AND IsBlocked=0
    

    You can then update the records they accept to IsApproved=1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to manage permissions and access to a SQL Server database server on
Let's say I want to design a REST store used to manage a list.
I have three UILabels. I want to detect which label is Tapped, and then
I'd like to know if there's a better approach to this problem. I want
For my iPhone app, I want to manage values either in NSMutableDictionary or NSMutableAarray
I want to try CMake to manage a new C++ project. However, some files
i want to create some command line utilities to manage many wordpress site, allowing
I want to build a web based front-end to manage/administer my Linux box. E.g.
I want to write a unit test for a Django manage.py command that does
I want to use the TFS WebAccess to open/manage work items. I have found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.