Data schema descriptor
Schema description
The schema must be expressed as an XML file. This file should be located at a core addon module and be named plugin-ddl.xml.
This DDL file can contain descriptions for tables, indexes and foreign keys.
Tables
A table is composed of a
entity containing one or more entities:
Attributes for entity
name
Table name
Attributes for entity
name
Column name
type
It can have one of the following values, as stated at java.sql.Types class:
INTEGER
LONG
BOOLEAN / BIT
FLOAT
DOUBLE
VARCHAR
CHAR
DATE
CLOB
BLOB
length
Optional column size.
notNull
true if it cannot contain null values
primaryKey
true if it's part of the primary key.
The primary key will be composed of all attributes marked as primary key. The order of them will be the same as their appear order at XML fi
Foreign keys
A foreign key is declared using the entity. It will contain one or more entities. Each columns identifies a member of the foreign key. It will also contain one or more entities. Each foreignColumn entity specifies the name of the corresponding column at the foreign table.
Attributes for entity
name
Foreign key name
tableName
Table name
foreignTableName
Name of master table
Attributes for entity
name
Column containing the foreign key
Attributes for entity
name
Column containing the foreign key
Indexes
An index is declared using the entity. It will contain one or more entities. Each column identifies a member of the index.
Attributes for entity
name
Index name
tableName
Table name
unique
true if no duplicated keys will be allowed
Attributes for entity
name
Column to be indexed
Sample plugin-ddl.xml