mdb-schema(1) Generate schema creation DDL


mdb-schema [options] database [backend]


mdb-schema is a utility program distributed with MDB Tools.

It produces DDL (data definition language) output for the given database. This can be passed to another database to create a replica of the original access table format.


-T <table>, --table <table>
Single table option. Create schema for this table only. Default is to export all tables.
-N namespace
Prefix identifiers with namespace.
Issue DROP TABLE statement.
Don't issue DROP TABLE statement. This is the default.
Issue NOT NULL constraints. This is the default.
Don't issue NOT NULL constraints.
Issue DEFAULT values.
Don't issue DEFAULT values. This is the default.
Issue CHECK <> '' constraints.
Don't issue CHECK <> '' constraints. This is the default.
Export INDEXes. This is the default.
Don't export INDEXes.
Export foreign keys constraints. This is the default.
Don't export foreign keys constraints.
Specifies target DDL dialect. Supported values are access, sybase, oracle, postgres, mysql and sqlite. If not specified the generated DDL will be in access format.


Defines the charset of the input JET3 (access 97) file. Default is CP1252. See iconv(1).
Defines the output charset to use for the SQL file. Default is UTF-8. mdbtools must have been compiled with iconv.
semi-column separated list of options:
  • use_index
  • no_memo
  • debug_like
  • debug_write
  • debug_usage
  • debug_ole
  • debug_row
  • debug_props
  • debug_all is a shortcut for all debug_* options



mdb-schema first appeared in MDB Tools 0.1.


The mdb-schema utility was written by Brian Bruns and others.


Relationships and other features may not be supported by all databases. Access datatypes are mapped to their closest counterparts in the target backend. This may not always yield an exact fit.