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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:24:14+00:00 2026-06-13T13:24:14+00:00

I am trying to build a little system that would assign specific tags to

  • 0

I am trying to build a little system that would assign specific tags to an item, or a person to be precise. So, I have a list of persons and a list of tags. I need to assign 3 specific tags to each person (that correspond to 3 different skills this person might have).

In a nutshell, the output would look like this :

Person 1 | webdesign, ux, jquery
Person 2 | blogging, photography, wordpress
Person 3 | graphic-design, 3d, inventor
...

For now, those lists are stored in two different tables :

persons
-------
person_id
person_name

tags
-------
tag_id
tag_name

My main goal is to avoid repetition and to simply assign 3 existing tags to an existing person.

Could you give me a few hints on how to implement this? I know that a three-table design is common for a tagging system, but is it relevant in my situation?

Thanks for your help.

  • 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-13T13:24:15+00:00Added an answer on June 13, 2026 at 1:24 pm

    If you want to ensure that you don’t have any duplicates and to be able to add N tags to a person, then to properly implement a normalized design you would need a third table to link the tags to each person

    persons_2_tags
    --------------
    person_id
    tag_id
    

    To guarantee uniqueness, you can either use a composite primary key, or add a unique index to the table including both columns.

    See an example of the above in this SQL Fiddle.

    If you need to enforce the 3 tag limit at the database level, you can add a third column to the persons_2_tags table (tag_number for example) that is an enum with values of 1, 2, 3 and add that to your unique index. Insert logic would need to be handled at the application level, but would be enforced by the index.

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

Sidebar

Related Questions

I am currently trying to build a little widget that will retrieve a list
I'm trying to build a small class-like container that will make it a little
I have a site I'm trying to build and I've hit one little snag
I'm trying to build a little bit advanced users system using Joomla, but I
I'm trying to build a little renaming program to help save me time in
I'm trying to build my little app for cydia submission ... but I can't
I am trying to build a little javascript class for geocoding addresses trough Google
I am trying to build my own little toolbox for Vista. One of the
Maybe my question it's a little weird, but I'm trying to build a not-so-simple
I am trying to build a little sound generator with pygame and numpy. The

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.