Altova XMLSpy 2025 Professional Edition 

Cuando se crea una base de datos MySQL a partir de un esquema XML, los tipos de datos XML Schema se convierten en tipos de datos MySQL tal y como muestra la tabla que aparece a continuación:

 

Tipo de datos XML Schema

Tipo de datos MySQL

xs:ID

varchar(255)

xs:string

If no facets then varchar (255)

 

else if facet length is set and <= 255
then char

 

else if facet maxLength set and <= 255
then varchar

 

else if maxLength is set and <= 65545

then text

 

else if maxlength is set and <= 16777215
then mediumtext

 

else if maxlength is set and <= 429496295
then longtext

xs:normalizedString

Igual que xs:string

xs:token

Igual que xs:string

xs:Name

Igual que xs:string

xs:NCName

Igual que xs:string

xs:anyURI

Igual que xs:string

xs:QName

Igual que xs:string

xs:NOTATION

Igual que 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
then blob

 

else if facet maxLength is set and <= 255
then tinyblob

 

else if maxlength is set and <= 65545
then blob

 

else if maxlength is set and <= 16777215
then mediumblob

 

else if maxlength is set and <= 429496295
then longblob

xs:base64Binary

Igual que xs:hexBinary

xs:integer

Integer

xs:int

int

xs:negativeInteger

Integer (limitado a {...,-2,-1})

xs:positiveInteger

Integer (limitado a {1,2,...})

xs:nonNegativeInteger

Integer (limitado a {0,1,2,...})

xs:nonPositiveInteger

Integer (limitado a {...,-2,-1,0})

xs:unsignedInt

Int (restricciones adicionales)

xs:short

Smallint

xs:unsignedShort

Smallint (restricciones adicionales)

xs:long

Bigint

xs:unsignedLong

Bigint (restricciones adicionales)

xs:byte

Tinyint

xs:unsignedByte

Tinyint (restricciones adicionales)

 

 

© 2018-2024 Altova GmbH