.\" Text automatically generated by txt2man .TH mdb-schema 1 "03 February 2024" "MDBTools 1.0.0" "Executable programs or shell commands" .SH NAME \fBmdb-schema \fP- Generate schema creation DDL \fB .SH SYNOPSIS .nf .fam C \fBmdb-schema\fP [\fIoptions\fP] [\fB-T\fP \fItablename\fP] [\fB-N\fP \fIprefix\fP] \fIdatabase\fP [\fIbackend\fP] \fBmdb-schema\fP \fB-h\fP|\fB--help\fP \fBmdb-schema\fP \fB--version\fP .fam T .fi .fam T .fi .SH DESCRIPTION \fBmdb-schema\fP is a utility program distributed with MDB Tools. .PP It produces DDL (data definition language) output for the given \fIdatabase\fP. This can be passed to another \fIdatabase\fP to create a replica of the original access table format. .SH OPTIONS .TP .B \fB-T\fP, \fB--table\fP \fItablename\fP Single table option. Create schema for this table only. Default is to export all tables. .TP .B \fB-N\fP, \fB--namespace\fP \fIprefix\fP Prefix identifiers with namespace. .TP .B \fB--drop-table\fP Issue DROP TABLE statement. .TP .B \fB--no-drop-table\fP Don't issue DROP TABLE statement. This is the default. .TP .B \fB--not-null\fP Issue NOT NULL constraints. This is the default. .TP .B \fB--no-not-null\fP Don't issue NOT NULL constraints. .TP .B \fB--default-values\fP Issue DEFAULT values. .TP .B \fB--no-default-values\fP Don't issue DEFAULT values. This is the default. .TP .B \fB--not-empty\fP Issue CHECK <> '' constraints. .TP .B \fB--no-not-empty\fP Don't issue CHECK <> '' constraints. This is the default. .TP .B \fB--comments\fP Issue COMMENT ON statements with column/table descriptions. This is the default, but it's not supported by all backends. .TP .B \fB--no-comments\fP Don't issue COMMENT ON statements. .TP .B \fB--indexes\fP Export INDEXes. This is the default. .TP .B \fB--no-indexes\fP Don't export INDEXes. .TP .B \fB--relations\fP Export foreign keys constraints. This is the default. .TP .B \fB--no-relations\fP Don't export foreign keys constraints. .TP .B \fB--version\fP Print the mdbtools version and exit. .TP .B \fIbackend\fP 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. .SH ENVIRONMENT .TP .B MDB_JET3_CHARSET Defines the charset of the input JET3 (access 97) file. Default is CP1252. See \fBiconv\fP(1). .TP .B MDBICONV Defines the output charset to use for the SQL file. Default is UTF-8. mdbtools must have been compiled with iconv. .TP .B MDBOPTS Colon-separated list of \fIoptions\fP: .RS .IP \(bu 3 debug_like .IP \(bu 3 debug_write .IP \(bu 3 debug_usage .IP \(bu 3 debug_ole .IP \(bu 3 debug_row .IP \(bu 3 debug_props .IP \(bu 3 debug_all is a shortcut for all debug_* \fIoptions\fP .IP \(bu 3 no_memo (deprecated; has no effect) .IP \(bu 3 use_index (experimental; requires libmswstr) .SH NOTES .SH HISTORY \fBmdb-schema\fP first appeared in MDB Tools 0.1. .SH SEE ALSO \fBmdb-array\fP(1) \fBmdb-count\fP(1) \fBmdb-export\fP(1) \fBmdb-header\fP(1) \fBmdb-hexdump\fP(1) \fBmdb-import\fP(1) \fBmdb-json\fP(1) \fBmdb-parsecsv\fP(1) \fBmdb-prop\fP(1) \fBmdb-queries\fP(1) \fBmdb-sql\fP(1) \fBmdb-tables\fP(1) \fBmdb-ver\fP(1) .SH AUTHORS The \fBmdb-schema\fP utility was written by Brian Bruns and others. .SH BUGS Relationships and other features may not be supported by all databases. Access datatypes are mapped to their closest counterparts in the target \fIbackend\fP. This may not always yield an exact fit.