MDB2_Schema
MDB2_Schema self description
This is non authoritative but self described
1
0

database
General database/schema configuration
It is the root element of a MDB2 Schema, must contain at least 1 <table> and eventually some <sequence>
name
text Database name 1
create
boolean Create new 0=Use a previously installed database , 1=Create the specified database 0
overwrite
boolean Overwrite previous Overwrite previously created structures ? 0
description
text Database description Ignored by the parser
comments
text Free comments Ignored by the parser

table
Describes each table of the database
A child of <database>, must contain a <declaration> with at least 1 <field> and eventually some <index>.
<table> may also have a <initialization> with some <insert>
name
text 1 Table name Should be better taken as some NMTOKEN , use ASCII no space better.
was
text Table previous name
description
text Table description Ignored by the parser
comments
text Free comments Ignored by the parser
name_index
1
name
Indicates that 2 tables should not have the same name within a database

field
Describes each field in a table
<field> as a child of <declaration> so grand-child of <table>
name
text 1 Field name
was
text Field previous name
type
text 1 Field type Valid types: integer, text, boolean, date, timestamp, time, float, decimal, clob and blob.
default
text Optional default value
notnull
boolean Field required Must be set for fields belonging to an index (sql NOT NULL) 0
autoincrement
boolean Field auto increments It's a not null integer field with a primary key. Not supported by all DBMS but may be emulated 0
unsigned
boolean Unsigned Only for integer. Not supported by all DBMS 0
length
integer Length Some types as "text" optionally offer it.
description
text Field description Ignored by the parser
comments
text Free comments Ignored by the parser
name_index
1
name
Indicates that 2 fields should not have the same name within a table

index
Describes each index in a table
child of <declaration> so grand-child of <table>
name
text 1 Index name
was
text Index previous name
unique
boolean Index is unique The combined value of the contained fields is unique 0
primary
boolean Table primary index 0
description
text Index description Ignored by the parser, and not in 0.5.0 dtd
comments
text Free comments Ignored by the parser, and not in 0.5.0 dtd
name_index
1
name
Indicates that 2 indexes should not have the same name within a table

index_field
Describes what fields make an index in a table
<field> as a child of <index>
name
text 1 Referenced field name This should reference the name of some uncle <field>
sorting
text Field's order in the sort Valid: ascending or descending
description
text index field description Ignored by the parser
comments
text Free comments Ignored by the parser

insert_field
Describes each field in an insert for table initialization
child of <insert> from <initialization> so great-grand-child of <table>
name
text 1 field name This should reference the name of some grand-uncle <field>
value
text field value
description
text insert field description Ignored by the parser
comments
text Free comments Ignored by the parser

sequence
Describes each sequence of the database
A child of <database> , may contain one <on>
name
text 1 Sequence name
was
text Sequence previous name
start
integer Sequence start value
description
text Sequence description Ignored by the parser
comments
text Free comments Ignored by the parser
name_index
1
name
Indicates that 2 sequences should not have the same name within a database