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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:49:56+00:00 2026-05-26T12:49:56+00:00

Table1 ID INT Tags TEXT Table2 ID INT Tags TEXT The tags field could

  • 0

Table1

  • ID INT
  • Tags TEXT

Table2

  • ID INT
  • Tags TEXT

The tags field could look like this "abc def hij 123". Tags being space delimited. Each record could have in excess of 200 tags. (Tags are being defined "on the fly" )

Given a record from table1 I want to find the "most suitable" record from table2 where the tags in the row from table1 match tags in row from table2.

MySQL FULL text search seems like the best thing to use for this.

Table2 should only have around 800-1000 rows – so not much overhead there. But Table1 might have 20 million, and I may want to, in the future, do the reverse (find best match from table1 for a row in table2).

Question:

Do you think FULL TEXT search is the best thing to use here? If not what would could be an alternative?

I have looked into XML databases, and they promising (especially Xbase)… but do I feel confident to put that database live on a production machine? Not yet… (or should I?)

  • 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-26T12:49:57+00:00Added an answer on May 26, 2026 at 12:49 pm

    Full text search will not help you because neither your needle nor your haystack are normalized. If you had only a single tag (the needle) to search for in a de-normalized list (the haystack), FTS could help you. But, instead, you need to first normalize the list of search tags into a bunch of separate needles, then search for each one in the haystack.

    You’re much better off just normalizing the data in the first place (separate tag tables of the form (ID, Tag)) and using JOIN to determine how many points of commonality there are.

    On further consideration I would suggest a single TaggedItems table, with a structure like this: (TAG TEXT(3), ID1 INTEGER, ID2 INTEGER). When you want to tag table 1 you would issue an INSERT OR UPDATE (or MySQL equivalent) for the tag and the ID1 column. The same for table 2 and the ID2 column. Now, you can retrieve a similarity rating by selecting the count of records in this table where ID1 = the ID1 value you’re interested in and ID2 is NOT NULL, GROUPed BY ID2. No JOIN required.

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

Sidebar

Related Questions

I have a SQL table, which looks like this: id_question (int) | tags (varchar)
to simplify this let take that table: table1 ------------- id unique primary int myVal1
I'm using this table structure for a 'toxi' like TAGs system table TAGS +--------+-------------------+
In a table I have the following schema table1: playerID int primary key, nationalities
I have created one table using the below command: create table Table1( Id int
We have a table called table1 ... (c1 int indentity,c2 datetime not null,c3 varchar(50)
Table structure- int PrimaryKey DateTime Date int Price What I would like to do
Here is my table: id int(11) name varchar(255) description text highest_bidder int(11) value varchar(255)
In my application i am implementing search, it is like when user enter text
Given the following (heavily simplified) tables: create table Tags ( TagId int Primary Key

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.