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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:23:57+00:00 2026-06-17T19:23:57+00:00

I am working on a blog website and stuck at this: MySQL ‘ cat_list

  • 0

I am working on a blog website and stuck at this:

MySQL

  1. ‘cat_list‘ table contains columns: cat_id, cat_name (14 entries),
  2. ‘post‘ table have several columns where category is one of them where I need to store the category id in which the blog post was tagged to. the category ids are stored in an array(19820,83729). [because a blog post can be tagged in multiple categories]

I was trying to search ‘post‘ by one category ID and join ‘cat_list‘ to retrieve the cat name.
Please help me to do this or is there any other alternative database design I should consider?

  • 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-17T19:23:59+00:00Added an answer on June 17, 2026 at 7:23 pm

    If your post can be tagged with several categories your table model is wrong. You need an associative table between the blog post and the categories. Remove category id from post table and create a table post-category with columns post-id and category-id. Then also add indexes on theses two columns to speed up search in both directions (by category or by post).

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

Sidebar

Related Questions

I have a discussion forum/blog engine working with web forms. Each post contains html
I've tried doing my research on this, found this website: http://www.lullabot.com/blog/importexport-large-mysql-databases and still am
I am working on a blog site, upgrading it to MVC3. I have this
I'm working on a new blog website created using ASP.NET MVC. I'm wondering what
I was working on my website when I cam across this problem, I have
I have followed this blog post: url to integrate less with Umbraco. Also, while
I am working with an MVC 4 ASP.NET website using Entity Framework. This is
I'm working on upgrading a website completely. The current website has a blog set
I started developing an website analytics system in MySQL for a project I'm working
So I've been working on a new blog system for my website, which I'm

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.