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 7564273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:51:57+00:00 2026-05-30T13:51:57+00:00

I am trying to build / design a table that will serve purpose to

  • 0

I am trying to build / design a table that will serve purpose to a post/comment system similar to google+ that can support bidirectional one-to-many/many-to-many relations. What I have currently is

member_id, 
post_id, 
post_body, 
post_date, 
post_flagged, 
post_shared, 
post_likes
  • member_id = my members id’s
  • post_id = my auto increment column to give each post a unique id
  • post_body = the actual post
  • post_flagged = part of a moderation system I intend on building later
  • post_shared = some form of grouping id’s (not sure how this will work but think
    google+ circles)
  • post_likes = grouped member_id’s of who likes the post.

I have a comment table thats pretty much the same as the above except it has a comment_id on top of the ones above listed to server as its auto incriminate column.

What I am ultimately seeking here currently is I guess a sanity check. Does the above construct/schema look like it might work? would you add/remove/alter it in any way? If not/or if so. Can anyone also suggest what might be a good way to do the post_shared column? Is there some type of object or means of storing data in that column that would serve purpose to the logic of Google+ Circles?

  • 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-05-30T13:51:58+00:00Added an answer on May 30, 2026 at 1:51 pm

    From what I understand, your post_shared column is what is really in question here. Let’s say you have a post that is directed at 5 “circles” (we will steal this term from Google). How would you indicate that in your current setup?

    The only way to do this in one field is something like {1, 2, 3, 4, 5} where those numbers are the circle id’s. This isn’t a very good practice.

    The best way I can see to accomplish this would be to have this schema:

    • Posts: post_id, post_body, post_flagged, post_likes
    • Circles: circle_id, ...
    • PostCircles: post_id, circle_id

    The PostCircles table will show which posts are visible to which circles. In the example above, you have 5 rows in the PostCircles table. Let’s say the post id is 1:

    post_id    |    circle_id
    1               1
    1               2
    1               3
    1               4
    1               5
    

    Then you can use your query language to show display the appropriate posts, depending on which circles the viewer is in (note the user schema is not shown in this answer).

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

Sidebar

Related Questions

I am trying to build a data table structure that will best support the
I'm trying to build a blog. I would like to create a design that
We're trying to build an application that will describe our price list. The price
I am currently trying to build a small system that read's in a bunch
I'm trying to a design for a system where the user can define their
I'm trying to build out a mysql database design for a project. The problem
Trying to build sslsniff on a RHEL 5.2 system here. When compiling sslsniff on
I am trying to build a login page using hibernate and struts2. My design
I'm trying to build a Quicksilver style search system for the internal web app
Scenario :I am trying to build a Mobile Entertainment Portal. It will enable users

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.