Menu

#193 correlation functions

open
5
2009-01-14
2009-01-14
No

At the moment the correlation function is a simple string compare. This is fine for simple synthetic identifiers, but cannot cope with the oddities of natural identifiers.

For example if I need to correlate two decimal values, then correlation could not cope with:

'+23' correlated to '23'
'23.0' correlated to '23'

The correlation function needs to be type aware for the fields being correlated.

Also, some fields are composites. A good example is OASIS Genericode which defines a Code as a Code Value and a URI.

{'GBP', 'http://www.iso.org/iso4217/3char'} correlated to {'GBP', 'http://www.iso.org/iso4217/3char'}

The correlation function needs to be aware of composite identifiers of identity.

Also, some correlations are based on proximity. A good example is legal financial arithmetic which rounds monetary values down.

'£23.99' correlated to '£23.00'

I suggest the simplest thing to do is support XPath 2 definitions of equality, and let the user also select or define their own functions where needed. For example I can define a correlate function in XQuery that works on XML fields. For Java programmers, I expect you could do the same.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB