M
M
Maxim Korytko2021-12-07 19:04:36
PostgreSQL
Maxim Korytko, 2021-12-07 19:04:36

How to implement database update mechanism?

There are two databases: one is "current", the second is "updated". New tables could be added to the updated table, old ones could be deleted, columns could be added to existing tables, existing ones could be deleted.

How can I implement a mechanism for identifying updates in the database using the C++ language? A roadmap will suffice.
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
Xtensive, 2021-12-09
@jobzzoff

Judging by the description of the task, you are trying to make mechanisms that allow you to make changes to the database programmatically.
Implementing this from scratch is a difficult task, full of unforeseen features. At least a part of DDL operations will be accompanied by a change in the data itself.
There is a set of utilities that allow you to do this in a slightly more correct way - the system's database source control. The most famous are Liquibase and Flyway .
I won’t say if they have interfaces for calling from C ++, but it’s definitely worth looking in this direction.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question