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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:28:22+00:00 2026-05-25T20:28:22+00:00

I read here a lot but this is the first I’ve asked a question.

  • 0

I read here a lot but this is the first I’ve asked a question.

I’m developing a website, with LAMP, that is essentially all about user submitted articles. I would like to relate some articles together by tags (or keywords) so that I may show a viewer some content that is related.

I had an idea of creating a field within the MySQL database table, where the articles resides, called “tags” that consists of a comma delimited list of keywords. They would relate to the article and describe it’s content in some fashion. Yet I discovered this wasn’t a bright idea as I wouldn’t be able to index this very well.

So, how would I go about this, any ideas?

ps. Just seen the little box to the right on this site called, “Similar Questions” what I’m trying to achieve is a lot like that…

  • 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-25T20:28:23+00:00Added an answer on May 25, 2026 at 8:28 pm

    It’s a many-to-many relationship, and can be modelled using a separate table with a foreign key to the article ID, and a column for a tag. Multiple tags are added to an article by adding multiple rows to the table.

    For example, if you have two articles where:

    • Article 1 has tags “foo” and “bar” and
    • Article 2 has tags “bar” and “baz”

    then the table might look like this:

    article_tags
    article_id   tag
    1            foo
    1            bar
    2            bar
    2            baz
    

    You can even store the tag names in a separate table:

    tags
    id  name
    1   foo
    2   bar
    3   baz
    
    article_tags
    article_id   tag_id
    1            1
    1            2
    2            2
    2            3
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've read a lot, including here on SO that suggests this is a very
First of all I must say that this may seem like a lot of
I read through a lot of circular dependency topics but all of them seem
at first. I have searched and read here a lot and googling with bing
I have posted a question on here previously asking similar advise, but this project
This question is related to others I have asked on here, mainly regarding sorting
Hi there (my first question here ;-) There might be similar questions but none
I have read several interesting C#/F# comparisons here on stackoverflow. So, first of all,
I read here about std::auto_ptr<>::operator= Notice however that the left-hand side object is not
I've read several questions here concerning Tomcat and logging but I still really don't

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.