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

  • Home
  • SEARCH
  • 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 6756389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:31:06+00:00 2026-05-26T13:31:06+00:00

I have a website for which I am building in categories which would work

  • 0

I have a website for which I am building in “categories” which would work pretty much like the tags of StackOverflow.

What I am confused about it how to best structure the tables for this sort of a thing. For example, I know I’d need a table to structure the actual categories like the name, who made it, what date it was made, etc.

What I am not sure about is: when a record gets n number of different categories, how to store that in the database. Should I have the record_ids in the item table to which the categories belong, and just comma-separate the its? Or should I have a separate table with something like item_categories with item_id, category_id, etc…and just join that table and the item table, and the categories table when getting the category?

The ladder seems slow because of the join, but more organized and clean.

Or is there another way to structure this that I have not thought of? How is a good way to go about structuring this sort of data?

  • 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-26T13:31:07+00:00Added an answer on May 26, 2026 at 1:31 pm

    Make three tables. One for the page, one for the categories (along with meta information etc), and one to bind them together. That last table only need to have a pageid and a categoryid, to link records from both tables together.

    Don’t ever store comma separated values in a database, if you need to use those in joins or searches.

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

Sidebar

Related Questions

I'm building a small-scale website (a personal one) in which each page would have
I am building a Drupal website and want to have a facebook like box
Am building a website which will have articles, policies and laws and text stuffs.
I'm building a website which will show comics. I'd like to store each image
I'm building a small website which will have FBA enabled (SqlMembershipProvider) and I want
Good Evening, I'm building a website which will will look something like this: So
I am building an ASP.Net website, I have a db table which I want
I'm building a website which will have a Spanish and Italian version. In the
I am building a website which involves user comments and tags. I wish to
I have some website which requires a logon and shows sensitive information. The person

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.