mdb-schema(1)

πŸ’– mdb-schema(1) πŸ’–

okay bestie, pull up a chair, because we're talking about mdb-schema β€” a whole manual page, and yes it's the one from section 1 of the Executable programs or shell commands girlies. this is your group-chat crash course, no gatekeeping, periodt. ✨


🌸 NAME 🌸

mdb-schema β€” generate schema creation DDL. that's it, that's the whole vibe. it makes the DDL. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

mdb-schema [options] [-T tablename] [-N prefix] database [backend]
mdb-schema -h|--help
mdb-schema --version

like, look at her. so structured. so iconic. πŸ‘‘


✨ DESCRIPTION ✨

so mdb-schema is a utility program that ships with MDB Tools πŸŽ€

what does she do?? she produces DDL (that's data definition language, iykyk) output for the database you hand her. and then β€” and this is the main character part β€” you can pass that output to a different database to create a replica of the original access table format. literally cloning the fit. 🫢


πŸ‘‘ OPTIONS πŸ‘‘

okay here's the menu, bestie. every single one, no skipping, we're not doing the thing where we pretend half the options don't exist. πŸ™ˆ

  • -T, --table tablename β€” single table option. creates the schema for this table only. the default is to export all tables, so this is your "just the one, thanks" button. πŸ“
  • -N, --namespace prefix β€” prefix identifiers with namespace. give everything a little name tag. 🏷️
  • --drop-table β€” issue DROP TABLE statement.
  • --no-drop-table β€” don't issue DROP TABLE statement. this is the default. (so if you wanted dropping, you gotta ask, bestie.)
  • --not-null β€” issue NOT NULL constraints. this is the default.
  • --no-not-null β€” don't issue NOT NULL constraints.
  • --default-values β€” issue DEFAULT values.
  • --no-default-values β€” don't issue DEFAULT values. this is the default.
  • --not-empty β€” issue CHECK <> '' constraints.
  • --no-not-empty β€” don't issue CHECK <> '' constraints. this is the default.
  • --comments β€” issue COMMENT ON statements with column/table descriptions. this is the default, but lowkey it's not supported by all backends, so don't come for her if your target database acts brand new about it. 😭
  • --no-comments β€” don't issue COMMENT ON statements.
  • --indexes β€” export INDEXes. this is the default. πŸ”₯
  • --no-indexes β€” don't export INDEXes.
  • --relations β€” export foreign keys constraints. this is the default.
  • --no-relations β€” don't export foreign keys constraints.
  • --version β€” print the mdbtools version and exit. slay and dip. πŸ‘‹
  • backend β€” specifies target DDL dialect. supported values are access, sybase, oracle, postgres, mysql and sqlite. if you don't specify one, the generated DDL will be in access format. no cap. πŸ’€

🌈 ENVIRONMENT 🌈

the environment variables, aka the backstage crew. they're doing the work and nobody claps for them. we see you. πŸ’œ

  • MDB_JET3_CHARSET β€” defines the charset of the input JET3 (access 97) file. default is CP1252. see iconv(1). ✨
  • MDBICONV β€” defines the output charset to use for the SQL file. default is UTF-8. mdbtools must have been compiled with iconv. (compiled with it, bestie. she can't do it otherwise.)
  • MDBOPTS β€” colon-separated list of options:
    • debug_like
    • debug_write
    • debug_usage
    • debug_ole
    • debug_row
    • debug_props
    • debug_all is a shortcut for all debug_* options
    • no_memo (deprecated; has no effect) β€” it's giving retired. she's out. 🫑
    • use_index (experimental; requires libmswstr) β€” experimental!! handle with care!! 🧚

πŸ’… NOTES πŸ’…

...the original page leaves this one absolutely empty. iconic of her honestly. nothing to report. moving on. πŸ™ˆ


πŸŽ€ HISTORY πŸŽ€

mdb-schema first appeared in MDB Tools 0.1. a legend since day one. ⭐


πŸ¦„ SEE ALSO πŸ¦„

go read these too, they're all in the same friend group:

mdb-array(1) mdb-count(1) mdb-export(1) mdb-header(1) mdb-hexdump(1) mdb-import(1) mdb-json(1) mdb-parsecsv(1) mdb-prop(1) mdb-queries(1) mdb-sql(1) mdb-tables(1) mdb-ver(1)


🫢 AUTHORS 🫢

The mdb-schema utility was written by Brian Bruns and others. we stan. πŸ‘‘


πŸ’€ BUGS πŸ’€

okay so real talk, caveats, no filter:

  • relationships and other features may not be supported by all databases.
  • access datatypes are mapped to their closest counterparts in the target backend. and this may not always yield an exact fit β€” so like, it's a vibe match, not a twin. check your output, bestie, fr fr. 😭

🚨 reminder that the defaults are doing a LOT here: --no-drop-table, --not-null, --no-default-values, --no-not-empty, --comments, --indexes and --relations are the ones switched on unless you say otherwise. don't be surprised when your DDL shows up with NOT NULL on it. πŸ™ˆ

that's the whole page, babes β€” go generate some DDL and be the main character of your own database migration. πŸŒΈβœ¨πŸ’–

this little love letter is brought to you by MDBTools 1.0.1, dated 13 July 2026 β€” mwah, xoxo, see you in the next manpage πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from