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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:03:17+00:00 2026-05-13T21:03:17+00:00

I am wanting to allow users to tag items so that they can search

  • 0

I am wanting to allow users to tag items so that they can search for them using tags. What is the best way of achieving this cleanly? So far the solution I have come up with only involves adding two extra tables to my current db system.

<db Trackable product 1>
int id;
info etc
</>

<db Trackable product 2>
int id;
info etc
</>

//defines the M:M relationship between Tag and various types of Trackable products
<db TagLink>
int trackableProd1Id
int trackableProd2Id
int tagId
</>

<db Tag>
int tagId
tag name etc
</>

Is this a good way to go about it? A benefit of this approach is that it should scale well and it also allows me to add more trackable products in the future by simply adding a column to TagLink table. This is obviously not a good idea if I planned to track 10’s of tables but for up to 3-4 tables it should prove to work well shouldn’t it?

  • 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-13T21:03:18+00:00Added an answer on May 13, 2026 at 9:03 pm

    Rather than multiple “TrackableProd_N_id” columns in TagLink table, I suggest you introduce a multi-column foreign key, such as

       TagLink table
          int ProdGroup    -- "points" to table 1 vs. table 2 etc.
          int ProductId
          int TagId
    

    in this fashion when additional sources of product come up you merely need to “invent” a new ProdGroup number for them, and use the ProductId (or other primary key from said table).

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

Sidebar

Related Questions

I'm wanting to allow users to enter HTML in only a single TextBox. I
I have a niche website that needs to allow users to post events and
I am wanting to have an In-App Purchase that allows my users to import
I'm using a CMS to allow users to add keywords to their profiles, but
I have created Facebook Test Users using the API. Facebook doesn't allow updates to
I am working on a site that will allow users to create an account.
I am creating a SaaS that will allow users to interact with it via
I'm creating a newsletter feature that will allow users to send emails. Since there
We are wanting to modify our app and create a way to allow mobile
I want to implement a Web Service that will allow users to store arbitrary

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.