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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:46:23+00:00 2026-06-15T01:46:23+00:00

I have a SQLite database which has (user_id, name). I want to detect if

  • 0

I have a SQLite database which has (user_id, name). I want to detect if a user is already in the system by name. The problem is that the name is coming from a user meaning that he can misspell the name or it may be an alternate version of the name: “Tim” vs “Timothy”. So I would like a function which finds the closest match to the input and gives a confidence of similarity to determine whether there is a match at all. The confidence should be between 0 and 1 (so that I can set a meaningful cutoff).

Table:

1 | Tim Best
2 | Roger Thomas
3 | Roper Bar
  • If the user enters Timothy Bert the function should return 1 | Tim Best | 0.8 (0.8 being the confidence, if that were what it happened to be).
  • If the user enters Roper Thomas the function should return 2 | Roger Thomas | 0.6
  • If the user enters Tim Taylor the function should return 1 | Tim Best | 0.3
  • If the user enters Foo Taylor the function should return 2 | Roper Thomas | 0.0

Ideally it would be best if I could write a query in SQLite to do this, but if thats not possible, I’ll take a c solution as well.

  • 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-15T01:46:25+00:00Added an answer on June 15, 2026 at 1:46 am

    There are several attempts to solve fuzzy string matching. Google tells you a lot and so does wikipedia. The most popular is Levenshtein. Other interesting approaches are Jaro-Winler and Trigram matching.

    My personal experience says that you have to play around with the algorithms which exist. I had a problem to match “FirstName LastName” vs. “LastName, FirstName” and the only algorithm suitable for my needs was a modified Trigram which I developed from the links provided.

    For your needs, you should also keep a dictionary of Name abbrevations so that you can convert each short form to its basic name and then do a fuzzy compare. However, this will most likely fail, as e.g. “Tin Taylor” where ‘Tin’ is misspelled ‘Tim’ will not lead to ‘Timothy Taylor’.

    In order to cover that, you will need a lookup that can ‘learn’, i.e. is edited by some human.

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

Sidebar

Related Questions

I have a text field in SQLite database, which I want the user to
I have a table in SQLite database of Android which has a column RANK
I have a sqlite database which is opened in :memory: that needs to be
I have a DataTable which I want to save to a SQLite Database Table.
I have an app which communicates to webserver. This webserver has SQLite database on
my app has a sqlite database which is already preloaded with data. the database
In my app I have SQLite database that has one table with date rows
I have an sqlite database called 'ProductDatabase.sql', which I have copied into my applications
I have an App which receives a SQLite database to read some data and
I have implemented an App which uses SQLite database, now if I run the

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.