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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:58:00+00:00 2026-05-24T00:58:00+00:00

Consider following tables structure: users (user_id, …) images (image_id, user_id, …) tag_links (tag_id, image_id)

  • 0

Consider following tables structure:

users (user_id, ...)
images (image_id, user_id, ...)
tag_links (tag_id, image_id)
tags_names (tag_id, tag_name)

Let’s say any given user_id has multiple images in the images table, and an image has multiple tags stored in tag_links.

How can I join these tables in order to get all tag_names used by any given user_id on all of his images? Are these kind of queries (joing multiple tables) slow and not recommended, or is it common to do 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-24T00:58:01+00:00Added an answer on May 24, 2026 at 12:58 am

    Joining is common and it’s the way it should be done.

    SELECT tn.tag_name
    FROM tags_names AS tn
    INNER JOIN tag_links AS tl ON tn.tag_id=tl.tag_id
    INNER JOIN images AS i ON tl.image_id=i.image_id
    WHERE i.user_id=YOURUSERID
    

    Your table design though only makes sense if a tag can have more then one name, if not use a column name on tag_links.

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

Sidebar

Related Questions

Consider following two tables: tag_names (tag_id, tag_name) tag_links (tag_id, image_id) An image can have
Consider the following tables: users and tweets user_id name tweet_id user_id tweet spam -----------------
Consider, if you will, the following tables: Vacation Model http://imagetiger.org/images/vacatilrl.png This may seem like
Let say that I have 2 tables with the same structure : STOCK and
Consider the following MySQL tables: APPLICATIONS (contains all applications by all users) unique_id |
Do splitting fields into multiple tables ever yield faster queries? Consider the following two
Consider the following table views user_id _date cnt ------------------------ 1 2011-02-10 123 1 2011-02-11
Consider the following tweets table tweet_id user_id text ----------------------------------------- 1 1 look at my
Consider following tables in MySQL database: entries: creator_id INT entry TEXT is_expired BOOL other:
Consider the following structure : alt text http://aeon-dev.org/pap/pap_db.png Ignore the table user_token. Now, imagine

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.