MS SQL Server
Bei Generierung eines XML-Schemas anhand einer MS SQL-Datenbank (DB) werden die MS SQL Server DB-Datentypen, wie unten in der Tabelle gezeigt, in XML-Schema-Datentypen konvertiert.
XML-Schema-Datentyp | MS SQL Server-Datentyp |
ID | uniqueidentifier |
xs:string | If no facets { if UNICODE nvarchar (255) else varchar (255) } else { if UNICODE (Size = either length or maxLength) If Size <= 4000 if FacetLengthIsSet then nChar else nVarChar if Size <= 1073741823 then nText } else { if NON-UNICODE (Size = either length or maxLength) If Size <= 8000 if FacetLengthIsSet then char else varchar if Size <= 2147483647 then text } |
xs:normalizedString | Wie xs:string |
xs:token | Wie xs:string |
xs:Name | Wie xs:string |
xs:NCName | Wie xs:string |
xs:anyURi | Wie xs:string |
xs:QName | Wie xs:string |
xs:NOTATION | Wie xs:string |
xs:boolean | bit |
xs:float | real |
xs:double | float |
xs:decimal | decimal |
xs:duration | datetime |
xs:dateTime | datetime |
xs:time | datetime |
xs:date | datetime |
xs:gYearMonth | datetime |
xs:gYear | datetime |
xs:gMonthDay | datetime |
xs:gDay | datetime |
xs:gMonth | datetime |
xs:hexBinary | If no facets varbinary (255) (Size = either length or maxLength If Size <= 8000 if FacetLengthIsSet then binary else varbinary if Size <= 2147483647 then image |
xs:base64Binary | Wie xs:hexBinary |
xs:integer | int |
xs:int | int |
xs:negativeInteger | Int (constrained to {...,-2,-1}) |
xs:positiveInteger | Int (constrained to {1,2,...}) |
xs:nonNegativeInteger | int (constrained to {0,1,2,...}) |
xs:nonPositiveInteger | int (constrained to {...,-2,-1,0}) |
xs:unsignedInt | int (additional constraints) |
xs:short | smallint |
xs:unsignedShort | smallint (additional constraints) |
xs:long | bigint |
xs:unsignedLong | bigint (additional constraints) |
xs:byte | tinyint |
xs:unsignedByte | tinyint (additional constraints) |