Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries



Links

Issociate
Impressum

#1: Relationship with Long Key - Hash Functions - MD5

Posted on 2007-10-05 05:03:17 by pereljon

Hi All!

I have a FM9 solution where I'm trying to find if a long text string
(1000+ characters on a single line with no returns) entered into a
text field exists in a field in another record. A direct relationship
link between the fields does not seem to work. FileMaker's technical
specs shows the following hard limit on text field indexes

"Index is based on the first 100 characters of each word or value."

Which is confusing... It makes me think that it should make an indexed
based on a text field of any length taking into account the first 100
characters of each work in the field. However, it does not appear to
really do this.

I've tried using the excellent MD5 example at http://www.fmwebschool.com/resources.php
by Brent Faulkner, but it seems to only work for fields of up to
around 300-320 characters.... After that I get a "?", which kills my
whole 1000+ character relationship.

So the question is:
1) should a relationship between two very long keys work in FM9?
2) is there another way to go about this?
3) has anyone used should the MD5 example with 300+ characters of
data?
4) are there any other hash functions that I could use to do this. I
don't care about encryption or security. I just need to generate some
sort of a unique low-collision key that FileMaker can use to make a
relationship.

Any help is MUCH MUCH appreciated!!!


Thanks


Jonathan Perel

Report this message

Mr Ad

Google

#2: Re: Relationship with Long Key - Hash Functions - MD5

Posted on 2007-10-05 12:39:35 by ursus.kirk

schreef in bericht
news:1191553397.337595.233420@k79g2000hse.googlegroups.com.. .
> Hi All!
>
> I have a FM9 solution where I'm trying to find if a long text string
> (1000+ characters on a single line with no returns) entered into a
> text field exists in a field in another record. A direct relationship
> link between the fields does not seem to work. FileMaker's technical
> specs shows the following hard limit on text field indexes
>
> "Index is based on the first 100 characters of each word or value."
>
> Which is confusing... It makes me think that it should make an indexed
> based on a text field of any length taking into account the first 100
> characters of each work in the field. However, it does not appear to
> really do this.
>
> I've tried using the excellent MD5 example at
> http://www.fmwebschool.com/resources.php
> by Brent Faulkner, but it seems to only work for fields of up to
> around 300-320 characters.... After that I get a "?", which kills my
> whole 1000+ character relationship.
>
> So the question is:
> 1) should a relationship between two very long keys work in FM9?
> 2) is there another way to go about this?
> 3) has anyone used should the MD5 example with 300+ characters of
> data?
> 4) are there any other hash functions that I could use to do this. I
> don't care about encryption or security. I just need to generate some
> sort of a unique low-collision key that FileMaker can use to make a
> relationship.
>
> Any help is MUCH MUCH appreciated!!!
>
>


Pereljon,

Well to begin with I think you might have misunderstood the reason of
relations, to be trying to use a 1000+ length relation key seems to be
ridiculous. Do you realy want to know one key of 301 characters from the
next where only the 301 character might be different? Generally you would
use a key something like this MyPartsID00000001 and perhaps sometimes (very
rarely) a key like MyMachineID000001MyPartsID00001. But I have never ever
needed such a very large key. Basicaly I would link any large amount of data
to an other large amount by way of an unique ID. And even if you have a very
good reason to want to use such large keys, I still would suggest not using
that field for a key but use an ID. It also seems that you are entering the
same large amount of data multiple times and as allways when you you
repeating a lot of steps a lot of times you should look for an easier
solution.

Indexing in FMP 9 according to the helpfile is: A value index is created by
taking each line of text (delimited by the carriage return character) and
taking up to the first 100 primary character weights that all the characters
in that line generate, according to the Unicode Collation Algorithm.

So for each line, delimited by a return, in a field the index starts over.
An indexed field might return multiple indexed lines, each based on the
first 100 characters of each line within that field.

Without knowing more detail what you are trying to achieve I realy can't say
much more. But my best bet is still that you need to rework your database.

Keep well, Ursus

Report this message

#3: Re: Relationship with Long Key - Hash Functions - MD5

Posted on 2007-10-05 22:55:20 by pmanet

wrote:

> I have a FM9 solution where I'm trying to find if a long text string
> (1000+ characters on a single line with no returns)

I presume you can't hash it and reduce the length (and how can you
assume you won't have collisions by reducing length ? it seem possible
only if the original chains are very limited in number of ASCII
possiiblities)

can't you select the only significant characters ?

admittingly it can be a very special problem, thus you can have multiple
key links

so, you can slice your 1000 charcaters in 10 fields of 100, and then
make your multifield relation work.

don't think of speed.

--
www.D-L-S.org

Report this message