Applications can require multiple database connections so that they can send and get data from different sources.
Using other database sources is incredibly simple. The only thing to do is to add a new database entry in the main configuration and use ActiveRecord support. All the operations on records will be transparent for the developer.
Here are some examples of connection strings (dsn) to configure access to other databases:
MySQL and MariaDB:
mysql:host=localhost;dbname=mydatabase
SQLite:
sqlite:/path/to/database/file
PostgreSQL:
pgsql:host=localhost;port=5432;dbname=mydatabase
CUBRID:
cubrid:dbname=demodb;host=localhost;port=33000
MS SQL Server (via the
sqlsrv
driver):sqlsrv:Server=localhost;Database=mydatabase
MS SQL Server (via the
dblib
driver):dblib:host=localhost;dbname=mydatabase
MS SQL Server (via the
mssql
driver):mssql:host=localhost;dbname=mydatabase
Oracle:
oci:dbname=//localhost:1521/mydatabase