The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

ermodel_to_text

Given the XML description of an Entity-Relationship model on stdin, dump the description of the model as an easy-to-parse tab-delimited text file.

Command-line options

--decamelize

If set, convert all entity, relationship, and field names to a decamelized form.

Output Format

The output is a tab-delimited file. It contains blocks of data delimited by lines containing only the string "//".

Each block of data describes either an entity or a relationship. A single line defines the entity or relationship name and the associated metadata. The remaining lines in the block define the field data associated with the entity or relationship.

An entity line contains the following fields:

The string "entity"
The entity name

A relationship line contains the following fields:

The string "relationship"
The relationship name
The name of the "from" entity.
The name of the "to" entity.
The arity of the relationship (1M or MM).
The name of the converse relationship.

Each field description line contains the following fields:

The name of the field
The field type
The name of a relation, if the field data is stored in a separate relation.