1.1. Connect to database

OrmFactory is a model-first database manager that supports multiple connections. It works with the data model rather than requiring an active database connection, which is why "multi-connection" can also mean "zero or more" connections.

You can add multiple connections to different databases - or none at all.

When you launch OrmFactory, the Start screen appears, allowing you to:

  • Open recently accessed projects.
  • Open an existing project.
  • Start a new project.
  • Create a new local connection.
  • Create a new project from a connection

Start screen

You can skip this step if you need to create a draft database design. Just press Esc to close the start window. This option is equivalent to "New project". Connection can be added later via context menu in project tree.

Local and project connections

There are two types of connections: local and project. Project connections are stored in the project file, while local connections are stored on the local machine and are visible across all projects.

Local connections appear in every project opened on the local machine, listed after all project connections. The connection type is also shown in the tooltip.

Connections in the main window

Active connection

If your project has only one connection, it becomes active by default. However, once you add a second connection, you’ll need to manually set the active one.
All database operations require an active connection. You can set a connection as active by right-clicking it in the Project Explorer.

Make connection active from main window

Note: Changing the active connection does not affect any open query windows.

Connection Profiles

A Connections Profile defines which connections are used for each database in the project.
Each profile maps every Database to a specific connection. All schemas inside that database share the same connection.

Switching active profile

You can create multiple profiles — for example, for Development, Testing, and Production environments — and switch between them using the dropdown in the main toolbar.
By default, the dropdown shows Active connection, meaning that OrmFactory uses whichever connection is currently set as active.

Add new profile

Offline Databases

A Connection Profile can leave a database without an assigned connection. In this case, the database operates in offline mode while that profile is active.

No connection means that no connection is assigned to the database in the selected profile. It does not refer to a special "Offline" connection.

OrmFactory does not provide a special Offline profile. You can create a regular Connection Profile and leave the connection unassigned for the databases that should operate offline.

For example:

Development
    Main DB  → Development connection
    Audit DB → Development connection

Offline
    Main DB  → No connection
    Audit DB → No connection

The Offline profile in this example is an ordinary profile created by the user.

An offline database remains a normal part of the project model:

  • Its structure can be edited.
  • No data can be fetched from it.
  • Synchronization and reverse-engineering are unavailable.
  • It still participates in project operations and code generation.

The same database can use a connection in one profile and remain offline in another.

Databases with Named Rows require a connection when the generator runs because Named Rows use data from the database as part of the model.

Password Storage

OrmFactory supports three password storage modes that define how database connection passwords are saved and protected.
You can select the mode globally in the Connection Profiles settings.

Mode Description Recommended for
Plain Passwords are stored in plain text directly in the project file. This mode is meant for local or test databases where security is not important. Local testing, disposable projects
Encrypted Passwords are stored in the project file, but encrypted with a static built-in key. Any instance of OrmFactory can decrypt them. Security is minimal — this mode only hides the password from casual inspection. Shared projects where passwords should not be immediately visible
Vault (default) Passwords are stored outside of the project file, in a secure local vault.
• On Windows, encryption uses DPAPI.
• On macOS — PlatformUUID key.
• On Linux — a static key, but stored separately from the project.
The vault file is located in the user’s local settings folder.
Regular use, shared repositories, production projects