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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:10:50+00:00 2026-05-28T00:10:50+00:00

I am working on a social networking site and it has a wall like

  • 0

I am working on a social networking site and it has a wall like facebook where user can post status, pics and stuff. Building a wall just for a user is not hard thing. I have structure like this.

Wall
  {
     Id,
     ToUserId (BigInt) (Owner of wall)
     ByUserId (The person who is posting)
     Content  (message, pic or something else)
     more fields....
  }

This wall is just for a user, I cant reuse it, For example, I am thinking site will have
other objects too like Pages, Groups etc. so all the objects will have Wall for them. I dont want to create separate table for each wall.

Then I thought, I can have ObjectId instead of ToUserId and my structure will be like this.

  Wall
  {
     Id,
     ObjectId (BigInt)(PageId/UserId/GroupId (one of them))
     ByUserId (The person who is posting)
     Content  (message, pic or something else)
     more fields....
  }

As I am using Increment field in my tables, A page can have same Id which a user has. so that is again a problem.

Next, I thought, my object should be string type

Wall
  {
     Id,
     ObjectId (string(10))(PageId/UserId/GroupId (one of them))
     ByUserId (The person who is posting)
     Content  (message, pic or something else)
     more fields....
  }

Now for a User, I will append “U” to the number so Object Id’s will be “1U”,”2U” and for pages they will be “1P”,”2P” and for a group “1G”, “2G”.

But I am still not convince, Would like to hear to expert advice on this.

Update

Thanks guys, The problem, I am having is, how can I keep one table for all types of walls.

A wall for a User
A Wall for a Page
A Wall for a Group

If you look at facebook, its one wall or atleast, I want to build it, so it should be attached to any object (to a user, to a page or to a group or to anything).

I hope this makes more sense now.

  • 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-28T00:10:51+00:00Added an answer on May 28, 2026 at 12:10 am

    I don’t understand why you’re trying to create some kind of “string” reference structure. That doesn’t seem “relational”.

    How about this.

    A User has many Posts.

    A User has one Wall.

    A Post has one Wall.

    A Post has one User.

    A Wall has many Posts.

    A Wall has one User.

    POCO’s (because i can’t be bothered writing SQL)

    public class User
    {
       public int UserId { get; set; }
       public ICollection<Post> Posts { get; set; } // the Posts this user has written. Could be against different Wall's
       public Wall Wall { get; set; } // the User's wall.
    }
    
    public class Post
    {
       public int PostId { get; set; }
       public User User { get; set; } // the User who wrote the post. 
       public Wall Wall { get; set; } // the Wall this Post belongs to. 
    }
    
    public class Wall
    {
       public int WallId { get; set; }
       public ICollection<Post> Posts { get; set; } // all the posts on this Wall.
    }
    

    Assumptions:

    • A Post can only be done against one Wall.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on social networking site where user can post photo and text
I am developing a social networking site. It has functionality like user registration, people
I'm working on a website that will use features of social networking (like facebook
I am working on a user based social network. I am building the site
I am working on social networking site. now our team decide to store user
I am working on a social networking site, where users can send messages to
About to start working on a social networking site, but I'd like to incorporate
I am working on a social networking site where people can comment on posts,
I've been working on the database for a very basic social networking site: all
I am working on a social site where users can block other users. Throughout

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.