Skip to content

Connect a database

Generate a diagram from database schema metadata: tables, columns, and relationships. This workflow maps the structure of your data rather than documenting the application’s behavior.

Topolix provides connection types for PostgreSQL, MySQL, SQLite, and Microsoft SQL Server. Connection fields depend on the selected type.

  1. Open Databases under Sources in the workspace sidebar.
  2. Add a connection, give it a recognizable name, and select its database type.
  3. Enter the connection details. Use credentials with access to the schema you want to inspect.
  4. Run Test Connection and resolve any connection or permission errors.
  5. Enable the connection for mapping and start generation from the available source action.

Adding and managing connections may require workspace owner access.

The database must be reachable from the Topolix backend. A localhost address refers to the machine or container running that backend, not the browser. For SQLite, the database file must be accessible to the backend.

The generated diagram shows the structure discovered through introspection, including tables, columns, and foreign-key relationships where available. Check that the expected schemas and relationships are present.

Missing relationships can reflect missing foreign-key declarations. A logical dependency in your application is not necessarily a declared database relationship. Add explanations or diagram changes where the database schema alone cannot express the full design.

Regenerate the diagram after a schema change when you need an updated view. Check the connection and generation status if a refresh fails. Do not assume a schema migration immediately appears in an existing diagram.

Unmapping removes the generated diagram from Topolix. It does not remove the database or change its tables. Export a copy first if you need to retain the diagram separately.

To see the database alongside its callers, combine diagrams in the same workspace.