MySQL
Lorsqu'un schéma XML est généré depuis une base de données MySQL (BD), les types de données MySQL BD sont convertis en des types de données de Schéma XML tels que recensés dans la table ci-dessous.
Type de données Schéma XML | Type de données MySQL |
xs:ID | varchar(255) |
xs:string | If no facets then varchar (255) |
| else if facet length is set and <= 255 |
| else if facet maxLength set and <= 255 |
| else if maxLength is set and <= 65545 then text |
| else if maxlength is set and <= 16777215 |
| else if maxlength is set and <= 429496295 |
xs:normalizedString | Comme xs:string |
xs:token | Comme xs:string |
xs:Name | Comme xs:string |
xs:NCName | Comme xs:string |
xs:anyURI | Comme xs:string |
xs:QName | Comme xs:string |
xs:NOTATION | Comme xs:string |
xs:boolean | tinyint(1) |
xs:float | float |
xs:double | double |
xs:decimal | decimal |
xs:duration | timestamp |
xs:dateTime | datetime |
xs:time | time |
xs:date | date |
xs:gYearMonth | timestamp(4) |
xs:gYear | year(4) |
xs:gMonthDay | timestamp(8); constraints to check month, day |
xs:gDay | timestamp(8); constraints to check day |
xs:gMonth | timestamp(8); constraints to check month |
xs:hexBinary | If no facets then blob (255) |
| else if facet length is set and <= 255 |
| else if facet maxLength is set and <= 255 |
| else if maxlength is set and <= 65545 |
| else if maxlength is set and <= 16777215 |
| else if maxlength is set and <= 429496295 |
xs:base64Binary | Same as xs:hexBinary |
xs:integer | Integer |
xs:int | int |
xs:negativeInteger | Integer (limité à {...,-2,-1}) |
xs:positiveInteger | Integer (limité à {1,2,...}) |
xs:nonNegativeInteger | Integer (limité à {0,1,2,...}) |
xs:nonPositiveInteger | Integer (limité à {...,-2,-1,0}) |
xs:unsignedInt | Int (contraintes supplémentaires) |
xs:short | Smallint |
xs:unsignedShort | Smallint (contraintes supplémentaires) |
xs:long | Bigint |
xs:unsignedLong | Bigint (contraintes supplémentaires) |
xs:byte | Tinyint |
xs:unsignedByte | Tinyint (additional constraints) |