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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:59:22+00:00 2026-06-11T16:59:22+00:00

I see platforms using this: – properties table – id | name | ID_CATEGORY

  • 0

I see platforms using this:

- properties table -
id | name | ID_CATEGORY (INT)

- categories table -
id | name

- property_categories -
id_category | id_property

And retrieving properties by category with

SELECT * FROM properties, categories, property_categories
WHERE 1
   AND categories.name = "Some category name here" # match this category name
   AND categories.id = property_categories.id_category # match category
   AND properties.id = property_categories.id_property # and match property

But I recently saw in an application this (with 2 tables instead of 3):

- properties table -
id | name | ID_CATEGORY (VARCHAR(255))

- categories table -
id | name

And retrieving properties by category with this query:

SELECT * FROM properties, categories
WHERE 1
   AND categories.name = "Some category name here" # match this category name
   AND FIND_IN_SET(categories.id, properties.ID_CATEGORY)

Are there any performance benefits? Should the second method be used in favor of the first one? Is it ok if I leave this unchanged?

Sometimes there are many fields combined (including ID_TYPE, ID_STATUS, etc.) and there’s a big JOIN gluing all data together for filters.

  • 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-11T16:59:23+00:00Added an answer on June 11, 2026 at 4:59 pm

    FIND_IN_SET is for comma-delimited strings, e.g.

    SELECT FIND_IN_SET('b','a,b,c,d');
    

    That would be a lousy way to store a bunch of values – for example, you can’t use an index to find ‘b’.

    Use multiple rows.

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

Sidebar

Related Questions

see fiddle if patient has time slot alloted already then make color yellow using
See this question. How to show popup message like in stackoverflow I am trying
see fiddle i have html table and one textbox and one button.make cell selection
see jsbin if u seen my jsbin then i have two table hardcode table
I am using this OAuth lib: http://github.com/jdg/oauthconsumer When adding it to my project, it
I've installed RoR in my MacOS X using this guide http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/ Here my versions:
I have a list mapped using Hibernate with an index column. The table looks
Xcode is giving me this warning: ld: warning: duplicate dylib /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/system/libSystem.host.dylib There's an SO
I cannot figure out why rails/ruby cannot see this gem, despite each telling me
See Deepa answer for the solution :) I read all of the solution given

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.