Import from SQL Power Architect

You can upload a .architect file from SQL Power Architect into the schema designer. The tables and columns in the database design will be converted to entities and fields.

This is currently an experimental feature. Please pass on any comments or bugs about the features.

The import performs the following:

  • Each table is converted to an entity.
  • Each column is converted to a field, and linked to the entity.
  • Posted foreign keys are represented by link fields on the child. These take the name of foreign key used to perform the link; some renaming of foreign keys may be useful (typically into the name of an identifier of the link parent, e.g. "product_identifier").
  • In a parent-child relationship, if the parent fields on the child entity don't match the names of the ones on the parent entity, an entity mapping is generated to allow the child field names to be used to resolve the relationship. This will be required when a child has two links to the same parent.
  • Identifying relationships are also represented by children fields on the parent if the first (or only) field on the relationship mapping at the child end has the property create_children=true on it (see below for coding properties). SQL Power Architect does not actually give control over the order of fields in a relationship mapping, so if the parent has multiple keys add create_children=true to each field on the child that takes part in the relationship.
  • For identifying relationships, If there is a single integer column in the key of the child that has the letters "seq" in it (case insensitive), it is assumed to be a sequence field.
  • Data types are translated into schema designer-supported data types. Some data types are promoted. For example, real and float are both promoted to double, tinyint to smallint. Where there is no designer equivalent for a field (such as binary or bit data), an error is raised.
  • Numeric suffixes are added to fields where there is more than one field with the same name, if their definition is different.
  • Additional properties coded into remarks on single lines of form keyword=value will be added to the properties. The properties need to match the names set on the member mappings in the import.
  • Use the remarks approach to set unique, unique_identifier and unique_sequence properties. If unique is set, but unique_identifier is not set, set unique_identifier and unique_sequence to the first two fields of the primary key (which should be the only fields).
  • Use the remarks to set the data_store property, if the table is not held on the default database.
  • Use the remarks approach on the first post foreign keys to add properties to the generated link field. This is useful for setting autocreate=true.
  • A default source system is created which lists all the entities and resolvers.