The SQL Database connector allows you to integrate Memento Database with your external relational databases. By establishing this connection, you can pull records directly from your database tables and link them to your Memento entries.
Currently, Memento Database supports the following database dialects:
- PostgreSQL
- MySQL
- Microsoft SQL Server (MS SQL)
Connector Configuration

To set up a new SQL connector, you need to provide the standard connection details for your database server. The configuration parameters include:
- Connector Name: A descriptive name for your connection (e.g., “Main Production DB”) to help you identify it in your connector list.
- Dialect: Select the appropriate database management system from the drop-down menu (PostgreSQL, MySQL, or MS SQL).
- Host: The server address or IP where your database is hosted (for example, localhost or db.example.com).
- Port: The network port number used by the database server (e.g., 5432 for PostgreSQL).
- Database: The specific name of the database you are connecting to.
- Username: The login name of the database user with the necessary read permissions.
- Password: The authentication password for the user. For your security, there are two ways to enter this:
- Direct Input: Type the password directly into the field.
- Environment Variable (Recommended): Instead of saving the password in plain text, you can reference an environment variable where the password is securely stored. Use the format
${env:YOUR_VARIABLE_NAME}
Using Database Tables as Resources
Once the connector is successfully created and the connection is established, Memento Database will automatically fetch the schema of your database. All accessible tables will then appear as selectable options in the Resource drop-down list when configuring your External field.
Important Requirement: Primary Keys
In order to use a database table as a data source in Memento Database, the table must contain a Primary Key. Memento relies on this primary key to serve as the unique identifier for each external object. Without a primary key, the system cannot reliably link, track, or synchronize specific records.