Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Create a Project in a MySQL Database
To create a project in a repository on MySQL 5, you work through these stages:
- Stage 1: Create an empty database repository and set up the data tables
- Stage 2: Set up the ODBC Driver
- Stage 3: Perform a project integrity check on the project file you are using as a base (optional, but recommended)
- Stage 4: Transfer the data
- Stage 5: Connect to the repository and open the project
Prerequisites
- Install MySQL version 5 or higher, and MySQL ODBC - either 5.1.5, or higher than 5.2.4 (other versions are not recommended)
Create a MySQL Repository
MySQL supports two different storage engines - InnoDB and MyISAM. In older versions of MySQL, MyISAM was the default storage engine, but from MySQL v5.5 onwards InnoDB is the default.
Sparx Systems provides scripts to create both InnoDB- and MyISAM-based repository tables; however, we recommend all users to choose InnoDB as it supports transactions and UTF8.
Step |
Action |
See also |
---|---|---|
1 |
Create an empty MySQL database. |
Create a MySQL Repository Registered User's Scripts page Trial User's Scripts Page |
2 |
Set up the MySQL .ini file. |
|
3 |
To use InnoDB tables, run the MySQL_InnoDB_EASchema.sql script. To use MyISAM tables, run the MySQL_MyISAM_EASchema.sql script. |
Set Up the ODBC Driver
Step |
Action |
See also |
---|---|---|
1 |
Create a suitable ODBC Data Source to point to your new database. Select these checkboxes:
|
Set up a MySQL ODBC Driver |
Perform a Project Integrity Check
Step |
Action |
See also |
---|---|---|
1 |
In Enterprise Architect, open the file-based project or template from which you are creating the project on the repository. |
|
2 |
Select and run 'Project | Data Management | Project Integrity Check'. This ensures your project data is 'clean' before being copied to the repository. |
Project Integrity Check |
Transfer the Project Data
Step |
Action |
See also |
---|---|---|
1 |
Open Enterprise Architect. (If the 'Open Project' dialog displays, click on the to open with no project loaded.) |
|
2 |
Select the 'Project | Data Management | Project Transfer' menu option. The 'Project Transfer' dialog displays. |
|
3 |
In the 'Transfer Type' panel, select '.EAP to DBMS'. |
|
4 |
In the 'Source Project' field, type the name of the project file to copy to the repository. If the .EAP file has Replication enabled, this must be removed before performing the transfer. |
Remove Replication |
5 |
At the right of the 'Target Project' field, click on the The 'Datalink Properties' dialog displays. |
|
6 |
Select 'Microsoft OLE DB Provider for ODBC Drivers' from the list. Click on the . |
|
7 |
In the 'Use Data source name' field, click on the drop-down arrow and select the ODBC Data Source you configured to point to your new database. Click on the . The 'Project Transfer' dialog redisplays. |
Set up a MySQL ODBC Driver |
8 |
If required, select the 'Logfile' checkbox and type a path and filename for the data transfer log file. |
|
9 |
Click on the to begin the data transfer process. |
|
10 |
When the process is complete, you have created a project on a MySQL database and can now connect to it and open it from Enterprise Architect. |
Connect to a MySQL Data Repository |
Learn more