Dados Chatos
Dados Chatos

Reputation: 23

Synchronization of tables in the database

I am in a scenario where I have 2 applications (Rest API), and each of them has its own database. Application A with database A, and application B with database B. Database A has a table X that I need to use within the use cases of API B. The database I'm using is postgresql.

As an initial solution, I created a similar table and tried to synchronize it via HTTP requests, but this was extremely slow, given that this table has many rows. As a second solution, I established a second connection to API B with the database of API A. I would like to know if there is any other way to perform this synchronization and if there is a way, perhaps using triggers, so that whenever the X column in database A receives new data or updates, the synchronized table in database B is also updated.

Upvotes: 0

Views: 50

Answers (0)

Related Questions