- From: Richard Cyganiak <richard@cyganiak.de>
- Date: Tue, 11 Oct 2011 19:38:08 +0100
- To: Eric Prud'hommeaux <eric@w3.org>
- Cc: ashok malhotra <ashok.malhotra@oracle.com>, RDB2RDF WG <public-rdb2rdf-wg@w3.org>
Eric, This point is not about extensions. It is about the behaviour of conforming DM implementations that connect conforming SQL-2008 implementations to conforming XSD implementations. A SQL implementation that handles 38-digit decimals *is conforming*. Many popular SQL implementations do. An XSD implementation that handles 38-digit decimals *is conforming*. Many popular XSD implementations do. The correct mapping from one to the other is obvious and trivial. A DM spec that requires conforming DM implementations to throw away the last 20 digits when converting from one to the other is simply *BROKEN*. It doesn't make any sense at all. The fact that you don't realize this scares me. You justify throwing away these 20 digits by saying that it somehow promotes interoperability. It doesn't. It means that some implementers will implement the broken spec, while others will implement the simple, obvious and correct mapping. This is not improving interoperability! In fact, just saying, “for decimals, the behaviour is undefined, you should do the obvious thing” would probably result in better interoperability. Giving implementers the choice of *either* being correct *or* being conforming is a recipe for disaster. Editorial suggestion: use the text from the R2RML spec. Unlike the current DM text, it is *correct*. Adding an *informative note* to the effect that XSD doesn't require support for more than 18 digits could be useful. Thank you, Richard On 11 Oct 2011, at 16:00, Eric Prud'hommeaux wrote: > * Richard Cyganiak <richard@cyganiak.de> [2011-10-11 14:01+0100] >> Eric, >> >> I maintain my -1 to any design that asks a conforming DM implementation that operates over a conforming SQL-2008 implementation to discard information. > > The Direct Graph is defined for data where we can expect interoperability. This covers all of the use cases in our Use Cases document, and frankly, every use case I've seen outside of certain exotic gene databases. I think we're well past an 80/20 compromise here. > > There is text suggesting correct behavior for extensions which exceed this space: > [[ > Extensions to the Direct Mapping should note the spirit of this mapping, i.e. to use a valid representation of an XML Schema Datatype corresponding to the SQL datatype. For numerics, booleans and dates, the canonical XML Schema lexical representation is used. Extensions are likely to map data outside of the minimal SQL conformance into data types with higher precision than those specified by the literal map. > ]] > > I believe the "data types with higher precision" sentence addresses the data you wish to preserve without claiming that it's in the core language. The text about using "a valid representation of an XML Schema Datatype" directs those who wish to represent data types we've not covered, as well as those outside the SQL range (e.g. the year before 0001 should be -0001, not 0000¹). > > Directing extensions to use XSD provides more interoperability than simply capturing the vendor-specific lexical form of SQL extensions for e.g. dateTimes (which may or may not have a year 0000). > > I'd like editorial suggestions, as well as advice from the WG about whether we should materialize the ellusive minimal intersection between SQL and XSD so that others don't have to do it: > > decimal 18 digits per XSD > integer 18 digits per XSD > double '±' + 16ch mantissa + 4ch exp per IEEE754 // what to do with NAN, +∞, −∞? > date 4 digits per SQL > time hh:mm:ss.mmmmmm per SQL > > ¹http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#year-zero > > >> Best, >> Richard >> >> >> On 11 Oct 2011, at 03:04, Eric Prud'hommeaux wrote: >> >>> * ashok malhotra <ashok.malhotra@oracle.com> [2011-10-04 10:14-0700] >>>> Minutes of Oct 4 RDB2RDF Telcon are at http://www.w3.org/2011/10/04-RDB2RDF-minutes.html >>> >>> per the action implied by >>> [[ >>> Ashok: "if your datatypes are inside of SQL *AND* XSD, this is the behavior. if not, it's undefined and we won't write test cases [outside of the intersection of the intersection of XSD *AND* SQL]" >>> ]] >>> I created a post LC version of the document: >>> http://www.w3.org/2001/sw/rdb2rdf/directMapping/LC/Overview >>> and added some text about the derivation and extension of the data mappings in the Direct Graph: >>> http://www.w3.org/2001/sw/rdb2rdf/directMapping/LC/Overview#minimal-DG >>> >>> >>>> Thanks to David for scribing >>>> -- >>>> All the best, Ashok >>>> >>> >>> -- >>> -ericP >>> >> > > -- > -ericP >
Received on Tuesday, 11 October 2011 18:38:53 UTC