# Introduction

The Feature Data Objects (FDO) API provides access to data in a data store. A provider is a specific implementation of the FDO API that provides access to data in a particular data store. The FDO Provider for MySQL provides FDO with access to a MySQL-based data store.

MySQL 5.0.22 and later is supported. You can create, edit, and delete MySQL data stores and schemas, or you can access existing databases in MySQL that were created by other applications. The FDO Provider for MySQL supports native MySQL geometry, indexing, two-dimensional geometry (compatible with the OGC Simple Feature specificaton), and spatial query operations, but not transactions. Auto-generated properties are auto-incremented. MySQL uses a revision number for optimistic concurrency.

Note:
  If you cannot connect to your MySQL data source and you receive the error message, "Specified credentials are not valid or the provider is unable to establish a connection," copy the libmySQL.dll file into the \FDO\bin folder under the Autodesk product install folder to resolve the problem.

A MySQL schema can support the following:

- Inheritance
- Multiple schemas
- Object properties
- Association properties
- Schema overrrides
- Auto ID generation
- Null value constraints
- Unique value constraints
- Composite unique value constraints
- Spatial contexts
- These geometry types: point, line string, polygon,multi-point, multi-line string, multi-polygon, curve string, curve polygon, multi-curve string, multi-curve polygon, linear ring, line string segment, circular arc segment, and ring.

When you create a MySQL schema, the following restrictions apply:

- A feature class must define or inherit at least one identity property.
- You cannot specify default values for data properties.
- Inclusive value range constraints are not supported.
- Identity properties cannot be nullable.
- Read-only identity properties must be autogenerated.
- A feature class can have multiple geometric properties; main geometry is not mandatory, but this attribute of the feature class indicates which geometry property to use as the default for queries and rendering. HasMeasure and HasElevation are supported.
- The maximum length of a string is 65,535 bytes.
- For decimal properties, precision must be between 1 and 65 inclusive and scale must be between 0 and 30 inclusive.

The FDO Provider for MySQL API provides custom commands that are specifically designed to work with the FDO API. For example, using these commands, you can do the following:

- Gather information about a provider.
- Transmit client services exceptions.
- Get lists of accessible data stores.
- Create connection objects.
- Create and execute spatial queries.

There is also support for spatial data types.

The MySQL architecture supports different storage engines. Choose an engine as needed, depending on its characteristics and capabilities, such as the following:

- MyISAM is a disk-based storage engine. It does not support transactions.
- InnoDB is a disk-based storage engine. It has full ACID transaction capability.
- Memory (Heap) is a storage engine utilizing only RAM. It is very fast.
- BDB is the Berkley DB storage engine. It supports transactions.
- NDB is the MySQL Cluster storage engine.
- MERGE is a variation of MyISAM. A MERGE table is a collection of identical MyISAM tables, which means that all tables have the same columns, column types, indexes, and so on.

For more information, see The Essential FDO and the FDO Developer's Guide.