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 three different connection types:
- MS Access
- Firebird, and
- ODBC
For the first two you only have to specify the full path to the database files; for connections of type ODBC you are prompted to select from the list of pre-defined 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 . |
|
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 to display the 'Find Toolbox Item' dialog and specify 'Data Modeling'). |
|
2 |
Drag the 'Database Connection' icon onto the diagram.
This generates the Database Connection element:
|
|
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:
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 Project Browser or a diagram. Right-click on the element and select the corresponding 'Delete <element name>' option.
Notes
Learn more