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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:21:39+00:00 2026-05-18T05:21:39+00:00

I just need some advice about using tags. I’m working on a website right

  • 0

I just need some advice about using tags. I’m working on a website right now and the users can post videos, images, audio and information about themselves.

I never worked with tags before on a normal website (did work with them on wordpress, youtube etc..), so I need some advise to start designing my database.

What is the common way to work with tags when you have multiple categories? Do I have to add tags for each category?
Example:

Table:
gallery

gallery_id
image
tags

Table
audio

audio_id
title
link
audio_tags

Etc... 

Or do I make only one table named “tags” and all the tags in it?
Like:
Table Tags:

tag_id
tag

Thanks in advance.

  • 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-18T05:21:39+00:00Added an answer on May 18, 2026 at 5:21 am

    It depends if you want tags to be shared among multiple objects. If you want that to be separate, then i would make separate tag tables for them. If not, I would have the same tag table, and use different tables for each relation the tags will have, so

    for separate:

    gallery
    ...
    gallery_tags
    tag_id
    tag
    
    tags_to_gallery
    tag_id
    gallery_id
    ..same for audio..
    

    for not separate:

      gallery
      ...
      audio
      ...
      tags
        tag_id
        tag
    
      gallery_to_tag
      gallery_id
      tag_id
    
      audio_to_tag
      audio_id
      tag_id 
    

    you could also do this with one ploymorphic table. with a table with something like this:

    tag_relations
     tag_id
     object_id
     object_table
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need some advice how to go about this: 1) I retrieve an XML
I need some help with jQuery script again :-) Just trying to play with
I'm just starting out with the whole ajax thing and I need some help.
I need to serialize/de-serialize some objects into/from string and transfer them as just opaque
Seems so basic, I can't believe I don't know this! I just need a
We are writing a socket server in c# and need some advice on the
Here is my dilemma, I am working on some SaaS using ASP.net MVC3 and
Right now, I am using the RESTful Authentication framework for authorizations with my rails
I just need a file (picture, pdf or other type file for printing) of
This code does not seem to compile, I just need to write something to

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.