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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:59:31+00:00 2026-05-31T07:59:31+00:00

I am trying to create an application like Facebook in which each user can

  • 0

I am trying to create an application like Facebook in which each user can create multiple albums and then place photos inside it. Users can also comment on the photos, so I need to make a database where album_name, pic_name, then comments on the pic will be applied.

I have a concept but I don’t know whether it is feasible or not.

Here is my user table schema:

candidate_register_table

|----------------------------------------------------|
|   username  |  name   |  age   | sex   | password  |
|----------------------------------------------------|

A record would look like this:

|---------------------------------------------------------|
|   saz26  |  Saswat Routroy   |  26   | Male   | Saswat  |
|---------------------------------------------------------|

Now I want to create a table holding the album_names for each user creating albums.

Say the table name is saz26_albums, where saz26 is the username in the candidate_register_table, (I am concatenating the username with the string "_albumname" to create a table) the schema of this table will be like this:

|------------------------------|
| album_name  |  cover_pic     |
|------------------------------|

A tuple in the above table will look like this:

|--------------------------------------------------------------------------|
| Candidate_Pics/Male/saz26/MyPics  |Candidate_Pics/Male/saz26/MyPics/2.jpg|
|--------------------------------------------------------------------------|

That means, for each username, a new table username_albums will be created holding the path of each albums(folder) he creates:

Another table with the name saz26_pics will be created with the following schema:

|------------------------------------------|
| pic_name  |  album_name      | caption   |
|------------------------------------------|

For example like this:

|------------------------------------------|-----------------------------------|----------|
| Candidate_Pics/Male/saz26/MyPics/1.jpeg  |  Candidate_Pics/Male/saz26/MyPics | At Sea   |
|------------------------------------------|-----------------------------------|----------|

Now, the last part, which definitely needs a table for each picture, I mean that a table denoting a single pic, and it contains all the usernames, and their corresponding comments given by them.

Say for example, a table with name:

saz26_MyPics/1_comments

|----------------------------|
| username  |  comments      |
|----------------------------|

For example like this:

|----------------------------------|
| suhani18  |  Where is this place |
|----------------------------------|
| saz26     |      Dead Sea        |
|----------------------------------|

I don’t know whether any other possible design can be achieved, I just want someone to let me know any other possibilities. If any other possibilities not present, then is my design feasible enough?

Some people told me to maintain a schema somewhat like this by creating a table albums:

|-----------------------------------------|
| username  |  album_name | cover_pic     |
|-----------------------------------------|

This doesn’t solve my problem which is how to maintain comments on each picture. Because some pictures can have 200 comments, some 3 comments and some will have no comments at all.

  • 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-31T07:59:32+00:00Added an answer on May 31, 2026 at 7:59 am

    You only need four tables: users, albums, pics and comments. Each table should have an id column of type int, with auto_increment, and set as the primary key for the table.

    Then on table albums you have a user_id column for the album owner. On pics, you have an album_id, and on comments you have both pic_id and user_id (all int columns, preferably indexed).

    With such a structure, you can easily retrieve you data using SQL JOINS.

    UPDATE

    Since username is already a PK on the users table, you can use that instead of user_id in albums and comments.

    About the comments table: it seems to me that it only needs 3 columns: username (the user who made the comment), pic_id (the id of the picture the comment refers to), and comment (the comment itself).

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

Sidebar

Related Questions

I'm trying to create an application which monitors users like data in real time.
I am trying to create a facebook application (just learning) which will show unicode
I'm trying to create an installer-like application. Here is what its supposed to do:
I'm trying to create a .NET touchscreen application. I would like to be able
I'm trying to create an application where there is a JSplitPane which contains the
I am trying to create an application can modify properties in IL to create
I'm trying to create a iPhoto like application, where using an array of objects
I'm trying create a RCP Application with Eclipse, but I can't get past the
I am trying to create an application where users can select a date and
I'm trying to create maps application like the WP7 Maps. I know that in

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.