[Dbix-class] Maybe OT - How to create a result set based on 'similarity'?

Mario Minati mario at minati.de
Fri Mar 2 15:42:29 GMT 2007


Hello @all,

I'm looking for a solution to find out if there is already some data in 
my dataset that is similar to a new entry.

Example:
Companynames
I would like to find out if there are already companies in my 
addressbook (DB) which are similar to a given name to avoid double entries.

How to measure similarity:
I'am thinking of the hammingdistance. That means the difference between 
Linux and Linus is 1 as there is one letter different. The distance 
between Linux and Lisa is 3 as there is one letter more and two are 
different.

Does anyone have an idea how to realize that?
Can one realize this with code running on the database (PL/SQL or 
something) or is there a way doing that with DBIx::Class (drawback: all 
data had to read before processing).

Thank you for any hint.

Greets,
Mario Minati



More information about the Dbix-class mailing list