Book a Demo

Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

Database Connections

A Database Connection object provides a convenient way of storing the connection details of a live database. Enterprise Architect supports the definition of a number of different connection types:

  • MS Access
  • Firebird
  • SQLite (introduced in Enterprise Architect v16)
  • Native Connection (introduced in Enterprise Architect v16), and
  • ODBC

For file based connections (MS Access, Firebird and SQLite) you only have to specify the full path to the database files. For Native connections you will be prompted for the connection details of a database server. For connections of type ODBC you are prompted to select from the list of pre-defined ODBC DSNs on your machine.

Create a Database Connection Element

A Database Connection element is represented in the UML Data Modeling Profile as an Artifact element with the stereotype <<database connection>>. You create these either:

  • Within the Database Builder or
  • By dragging the 'Database Connection' icon from the 'Data Modeling' Toolbox pages onto a diagram

Add a Database Connection Using the Database Builder

Step

Action

See also

1

Open the Database Builder.

The Database Builder

2

Load or create a Data model.

3

Right-click on the Connections Package and select 'Add New DB Connection'.

4

Overtype the default name with the appropriate name for the Connection, and press the Enter key.

5

Double-click on the new Connection, or right-click on it and select 'DB Connection Properties'.

The 'Database Connection Properties' dialog displays.

Add a Database Connection to a Diagram

Step

Action

See also

1

Open your Data Modeling diagram and, if necessary, display the 'Data Modeling' page of the Diagram Toolbox (click on Search to display the 'Find Toolbox Item' dialog and specify 'Data Modeling').

2

Drag the 'Database Connection' icon onto the diagram.

Database Connection element

This generates the Database Connection element.

Database Connection element in Sparx Systems Enterprise Architect.

3

Double-click on the new element.

The 'Database Connection Properties' dialog displays.

Database Connection Properties

Option

Action

See also

DBMS Type

Click on the radio button for the appropriate type:

  • MS Access file based database
  • Firebird file based database
  • SQLite file based database
  • Direct Native connection, or
  • ODBC based database

The 'Save Password?' checkbox is only enabled for ODBC connection types, and indicates if Enterprise Architect should store the password for the selected ODBC DSN. The checkbox defaults to selected; that is, passwords are saved. While all connection passwords are encrypted before being saved, there can be occasions when data modelers want to restrict access to only users that have the required permissions.

Filename/DSN

If you have selected a 'DBMS Type' of MS Access or Firebird, type in or browse for the location and name of a physical file. If the file does not already exist it will be created.

If you have selected a 'DBMS Type' of ODBC, type in or select a defined ODBC DSN. Depending on the DBMS, you might be prompted for other details such as server, connection user ID and password.

Other Schemas

This field acts as a schema filter to limit the number of objects returned by enquiries made against the ODBC connection. Entering a value in this field is particularly important for Oracle databases to reduce the time it takes for making connections to the database, due to the large number of system objects.

If you need to enter multiple schemas to be filtered on, separate them with commas.

OK

Click on this button to save the changes you have made.

Delete Connection

If a connection is no longer required, you can delete it as for any other element from the Database Builder, the Browser window or a diagram. Right-click on the element and select the corresponding 'Delete <element name>' option.

Notes

  • It is advisable that when working in a team environment (that is, multiple users sharing a single Enterprise Architect repository) all ODBC based Database Connection objects are defined as 'DSN-less' so that the Database Connection object contains all necessary details and can therefore be shared between all users, although a Native Connection does this and is easier to setup
  • The DBMS type of a Database Connection object cannot be changed once the initial selection has been saved

Learn more