The Corporate and Suite Editions of Enterprise Architect support connecting to DBMS based model repositories.
To use a DBMS repository you need to create a database and then the Enterprise Architect schema which
consists of a collection of tables. General speaking the creation and modification of database definitions
is performed by a user (typically a DBA) with an elevated level of security, therefore these types of tasks
are handled outside of Enterprise Architect the application. Below are the scripts for each of the supported
Please Note: Throughout Enterprise Architect's history Sparx Systems have endeavored to avoid changing
the underlining database structure to remain compatible with older versions. However since 2010 there have
been two major schema releases:
Schema 1220 released in Jun-2016 with Enterprise Architect v13 (build 1302)
Schema 851 released on 10-Feb-2010 with Enterprise Architect v8 (build 851)
In both of the above releases to the schema changes have not required any code changes to the
Enterprise Architect logic, thereby allowing earlier version of Enterprise Architect to stay
compatible with newer schema definitions (and vice versa). In the most recent release,
'schema 1220' consists mainly of index updates which improve Enterprise Architect's overall
performance in larger models.
Creating a new DBMS based repository requires the following steps to be undertaken:
Create an empty database using your management console of choice
Execute the Enterprise Architect schema creation script
Load your model data
Please note: more detailed instructions are available for each DBMS product
Note 1: All long text fields are now MEDIUMTEXT (instead of TEXT) which allows for more than 65K characters.
Note 2: Default date values. Historically the EA MySQL script has used a default value
of 0000-00-00 00:00:00 (because early versions did not support the assignment of the current
date/time) for some date fields. This will cause errors in the later versions if your MySQL
environment is configured as strict mode with either NO_ZERO_IN_DATE or NO_ZERO_DATE.
As of v5.7.4 NO_ZERO_IN_DATE and NO_ZERO_DATE are both deprecated and enabled incorporated
into Strict Mode. There are two ways around these problems: 1) change the SQL mode of your
MySQL environment to allow zero dates or 2) update the EA script and replace the default
values of '0000-00-00 00:00:00' to NOW()
Microsoft SQL Server from 2005, all editions including Express and Azure
*** Diagram Image Optional Update ***
Without the Diagram Image Optional Update, whenever diagram images were imported
via XML (which also included copying diagrams), the user required an elevated level
of database permissions in order to insert new images. Using this schema update and
EA version 14 users no longer need elevated database permissions.
This schema update is NOT backwards compatible, after applying it the
model is only compatible with Enterprise Architect Version 14 and later. Sparx Systems
recommend that all users update to Enterprise Architect 14 before applying this script.
This schema update requires the repository to be using the EASchema1220.
Once a DBMS database is created and the Enterprise Architect schema defined,
the model now needs the 'base' data loaded. Traditionally this step has been
achieved by loading the contents of the 'EABase.eap' model into a newly created
database, using the Project Transfer action within Enterprise Architect.
As an alternative it is now possible to load this same data using standard SQL
statements. However please note the scripts below, only contain statements to
insert the data into a new/empty database, therefore don't attempt to run these
on models that already contain data.
If you have an existing Enterprise Archiect DBMS repository that was created
between Feburary 2010 and Jun 2016 then more than likely what is now referred
to as the EASchema851 was used to create your Enterprise Architect DBMS schema.
If your existing EASchmea851 DBMS repository is running smoothly and without
problems, then there is no immediate need to upgarde to the latest schema.
However there is a direct upgrade path from EASchema851 to EASchema1220 if
you so desired:
As mentioned above Enterprise Architect's official schema definition doesn't
change very frequently however if your model was created inbetween 10-Feb-2010
and Jun-2016 then it will not have the most up-to-date indexes defined.
The SQL scripts below are provided to update a 'schema 851' model to
'schema 1220'. The process to run these scripts should be:
Take a backup of the current DBMS repository.
Connect to the RDBMS database to be updated (using the SQL management console of choice).
Load the relevant EASchema_Alter851to1220_xxx.sql file.