<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="http://fdomysql.osgeo.org/schemas" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mysql="http://fdomysql.osgeo.org/schemas" xmlns:rdb="http://fdordbms.osgeo.org/schemas" xmlns:fdo="http://fdo.osgeo.org/schemas" targetNamespace="http://fdomysql.osgeo.org/schemas" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:import namespace="http://fdordbms.osgeo.org/schemas" schemaLocation="FDORdbmsOverride.xsd"/>
	<xs:import namespace="http://fdo.osgeo.org/schemas" schemaLocation="../../../../Fdo/Docs/XmlSchema/FdoOverride.xsd"/>
	<xs:element name="SchemaMapping" type="SchemaMappingType" abstract="false" substitutionGroup="fdo:PhysicalSchemaMapping">
		<xs:annotation>
			<xs:documentation>Schema Override Set for the FDO MySQL Provider.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="complexType" type="complexTypeType" abstract="false">
		<xs:annotation>
			<xs:documentation>MySQL Provider class override.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="element" type="elementType" abstract="false">
		<xs:annotation>
			<xs:documentation>MySQL Provider property override.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="Table" type="TableType" abstract="false">
		<xs:annotation>
			<xs:documentation>Class Table override</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="Column" type="ColumnType" abstract="false">
		<xs:annotation>
			<xs:documentation>Data Property Column override</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="GeometricColumn" type="GeometricColumnType" abstract="false">
		<xs:annotation>
			<xs:documentation>Geometric Property Column override</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="PropertyMapping" type="PropertyMappingType" abstract="true">
		<xs:annotation>
			<xs:documentation>Object Property Table overrides</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="PropertyMappingSingle" type="PropertyMappingSingleType" abstract="false" substitutionGroup="PropertyMapping">
		<xs:annotation>
			<xs:documentation>Object property embedded in containing class table.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="PropertyMappingRelation" type="PropertyMappingRelationType" abstract="true">
		<xs:annotation>
			<xs:documentation>Relational type Object Property Mapping.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="PropertyMappingConcrete" type="PropertyMappingConcreteType" abstract="false" substitutionGroup="PropertyMapping">
		<xs:annotation>
			<xs:documentation>Concrete type Object Property Mapping.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="SchemaMappingType" abstract="false">
		<xs:complexContent>
			<xs:extension base="SchemaMappingBaseType">
				<xs:sequence>
					<xs:element ref="complexType" minOccurs="0" maxOccurs="unbounded"/>
				</xs:sequence>
				<xs:attribute name="database" type="fdo:NameType" use="optional">
					<xs:annotation>
						<xs:documentation>Default MySQL named database for tables in this feature schema.
                            The default is the current database.
                         </xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="dataDirectory" type="fdo:NameType" use="optional">
					<xs:annotation>
						<xs:documentation>Default directory in which to store tables that were created during ApplySchema.
                            Must be an absolute path, not a relative path.
                        </xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="indexDirectory" type="fdo:NameType" use="optional">
					<xs:annotation>
						<xs:documentation>Default directory in which to store table indexes that were created during ApplySchema.
                            Must be an absolute path, not a relative path.
                        </xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="storageEngine" type="storageEngineType" use="optional">
					<xs:annotation>
						<xs:documentation>Default storage engine to use when creating new tables during ApplySchema.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="SchemaMappingBaseType" abstract="false">
		<xs:annotation>
			<xs:documentation>Restricts an MySQL Schema Mapping set to have the right default provider name.</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:restriction base="rdb:SchemaMappingType">
				<xs:attribute name="name" type="fdo:NameType" use="required"/>
				<xs:attribute name="provider" type="fdo:ProviderType" use="required" default="OSGeo.MySQL.3.2"/>
				<xs:attribute name="tableMapping" type="rdb:TableMappingType"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="complexTypeType" abstract="false">
		<xs:complexContent>
			<xs:extension base="rdb:complexTypeType">
				<xs:sequence>
					<xs:element ref="Table" minOccurs="0"/>
					<xs:element ref="GeometricColumn" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Column for GeometryProperty for class.</xs:documentation>
							<xs:documentation>This override is only applicable to Feature classes.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element ref="element" minOccurs="0" maxOccurs="unbounded"/>
				</xs:sequence>
				<xs:attribute name="autoIncrementPropertyName" type="fdo:NameType" use="optional">
					<xs:annotation>
						<xs:documentation>Which FDO property (if any) maps to an auto-increment column.</xs:documentation>
						<xs:documentation>If there is no auto-increment column, this should be an empty string.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="autoIncrementSeed" type="xs:integer" use="optional">
					<xs:annotation>
						<xs:documentation>The initial value for the auto-increment column.  This override is only 
                            valid if the autoIncrementProperty override is set and is not an empty string.
                        </xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="elementType" abstract="false">
		<xs:complexContent>
			<xs:extension base="fdo:SchemaMappingElement">
				<xs:sequence>
					<xs:choice minOccurs="0">
						<xs:annotation>
							<xs:documentation>One of the following overrides can be specified, depending on the element's property type.</xs:documentation>
						</xs:annotation>
						<xs:sequence>
							<xs:annotation>
								<xs:documentation>These overrides are only applicable to Data properties</xs:documentation>
							</xs:annotation>
							<xs:element ref="Column"/>
							<xs:element ref="ValidPropertyValueConstraintType" minOccurs="0"/>
						</xs:sequence>
						<xs:element ref="GeometricColumn">
							<xs:annotation>
								<xs:documentation>This override is only applicable to Geometric properties</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element ref="PropertyMapping">
							<xs:annotation>
								<xs:documentation>This override is only applicable to Object properties</xs:documentation>
							</xs:annotation>
						</xs:element>
					</xs:choice>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="TableType" abstract="false">
		<xs:complexContent>
			<xs:extension base="rdb:TableType">
				<xs:attribute name="database" type="fdo:NameType" use="optional">
					<xs:annotation>
						<xs:documentation>MySQL database where this table resides. The default is SchemaMappingType/@database.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="dataDirectory" type="fdo:NameType" use="optional">
					<xs:annotation>
						<xs:documentation>The directory in which to this table is stored.
                            Must be an absolute path, not a relative path.
                        </xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="indexDirectory" type="fdo:NameType" use="optional">
					<xs:annotation>
						<xs:documentation>The directory in which this table's indexes are stored.
                            Must be an absolute path, not a relative path.
                        </xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="storageEngine" type="storageEngineType" use="optional">
					<xs:annotation>
						<xs:documentation>The storage engine this table uses.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="ColumnType" abstract="false">
		<xs:complexContent>
			<xs:extension base="rdb:ColumnType">
				<xs:attribute name="formula" type="xs:string"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="GeometricColumnType" abstract="false">
		<xs:annotation>
			<xs:documentation>The geometric column overrides.</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="fdo:SchemaMappingElement"/>
		</xs:complexContent>
	</xs:complexType>
	<xs:simpleType name="storageEngineType">
		<xs:restriction base="xs:string">
			<xs:annotation>
				<xs:documentation>This override represents the storage entine type for a MySQL table.</xs:documentation>
			</xs:annotation>
			<xs:enumeration value="MyISAM"/>
			<xs:enumeration value="ISAM"/>
			<xs:enumeration value="InnoDB"/>
			<xs:enumeration value="BDB"/>
			<xs:enumeration value="Merge"/>
			<xs:enumeration value="Memory"/>
			<xs:enumeration value="Federated"/>
			<xs:enumeration value="Archive"/>
			<xs:enumeration value="CSV"/>
			<xs:enumeration value="Example"/>
			<xs:enumeration value="NDBClustered"/>
			<xs:enumeration value="Unknown"/>
			<xs:enumeration value="Default"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="PropertyMappingType" abstract="true"/>
	<xs:complexType name="PropertyMappingSingleType" abstract="false">
		<xs:complexContent>
			<xs:extension base="PropertyMappingType">
				<xs:attribute name="prefix" type="xs:string"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="PropertyMappingRelationType" abstract="true">
		<xs:complexContent>
			<xs:extension base="PropertyMappingType">
				<xs:sequence>
					<xs:element ref="Table" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Overrides for Object Property table</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element ref="element" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>Overrides for each column in Object Property table</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="PropertyMappingConcreteType" abstract="false">
		<xs:complexContent>
			<xs:extension base="PropertyMappingRelationType"/>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="ValidPropertyValueConstraintType" abstract="false">
		<xs:complexContent>
			<xs:extension base="rdb:ValidPropertyValueConstraintType"/>
		</xs:complexContent>
	</xs:complexType>
</xs:schema>