Oracle
When an XML Schema is generated from an Oracle database (DB), the Oracle DB datatypes are converted to XML Schema datatypes as listed in the table below.
XML Schema Datatype | Oracle Datatype |
xs:ID | ROWID |
xs:string | If no facets |
| if UNICODE then NVARCHAR2 (255) |
| else VARCHAR2 (255) |
| else if UNICODE |
| (Size = either length or maxLength) |
| If Size <= 2000 then NCHAR |
| if Size <= 4000 then NVARHCAR2 |
| if Size <= 4 Gigabytes then NCLOB |
| else if NON-UNICODE |
| (Size = either length or maxLength) |
| If Size <= 2000 then CHAR |
| if Size <= 4000 then VARCHAR2 |
| if Size <= 4 Gigabytes then CLOB |
xs:normalizedString | Same as xs:string |
xs:token | Same as xs:string |
xs:Name | Same as xs:string |
xs:NCName | Same as xs:string |
xs:anyURI | Same as xs:string |
xs:QName | Same as xs:string |
xs:NOTATION | Same as xs:string |
xs:boolean | NUMBER with constraint Boolean |
xs:float | FLOAT |
xs:double | FLOAT |
xs:decimal | NUMBER |
xs:duration | TIMESTAMP |
xs:dateTime | TIMESTAMP |
xs:time | DATE |
xs:date | DATE |
xs:gYearMonth | INTERVAL YEAR TO MONTH |
xs:gYear | DATE |
xs:gMonthDay | DATE |
xs:gDay | DATE |
xs:gMonth | DATE |
xs:hexBinary | if no facets then RAW (255) |
| (Size = either length or maxLength) |
| If Size <= 2000 then RAW (X) |
| else Size <= 2 Gigabytes then LONG RAW (X) |
| if Size <= 4 Gigabytes then BLOB (X) |
xs:base64Binary | BLOB |
xs:integer | NUMBER |
xs:int | NUMBER |
xs:negativeInteger | NUMBER (constrained to {...,-2,-1}) |
xs:positiveInteger | NUMBER (constrained to {1,2,...}) |
xs:nonNegativeInteger | NUMBER (constrained to {0,1,2,...}) |
xs:nonPositiveInteger | NUMBER (constrained to {...,-2,-1,0}) |
xs:unsignedInt | NUMBER (additional constraints) |
xs:short | NUMBER |
xs:unsignedShort | NUMBER (additional constraints) |
xs:long | NUMBER |
xs:unsignedLong | NUMBER (additional constraints) |
xs:byte | BLOB |
xs:unsignedByte | BLOB (additional constraints) |