Search code examples
sql-serverpostgresqlfirebirdmiddleware

Most straightforward way to consolidate data from multiple different RDBMS systems into a queryable database


I have few tables that I have to sync between 3 different RDBMS systems (PostgreSQL databases, a SQL Server and a Firebird Database).

Currently I simply connect to my Firebird database and pull the few relevant tables to my PostgreSQL database, but as databases change, new tables require querying and with the addition of a SQL Server database to the mix I feel this solution is ill fitting.

I've done some research on BI tools , but I still need to query data from this data source and show them inside a Windows Forms application.

PS: it's not a migration and I only need to query the data from these "satellite" databases


Solution

  • Using PostgreSQL as your hub, you can use Foreign Data Wrappers to reach out to the other two databases whenever a query wants their data. Then it will always be up to date, but performance might suffer compared to actually importing the data. For reaching SQL Server, you can use tds_fdw, and for firebird you can use firebird_fdw. I have never used either one of these, so this is just a starting point.

    You could probably pick SQL Server as your hub and accomplish the same thing, it calls them "linked servers" rather than Foreign Data Wrappers, see for example.